//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension ElasticsearchService {
    // MARK: Enums

    public enum AutoTuneDesiredState: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum AutoTuneState: String, CustomStringConvertible, Codable {
        case disableInProgress = "DISABLE_IN_PROGRESS"
        case disabled = "DISABLED"
        case disabledAndRollbackComplete = "DISABLED_AND_ROLLBACK_COMPLETE"
        case disabledAndRollbackError = "DISABLED_AND_ROLLBACK_ERROR"
        case disabledAndRollbackInProgress = "DISABLED_AND_ROLLBACK_IN_PROGRESS"
        case disabledAndRollbackScheduled = "DISABLED_AND_ROLLBACK_SCHEDULED"
        case enableInProgress = "ENABLE_IN_PROGRESS"
        case enabled = "ENABLED"
        case error = "ERROR"
        public var description: String { return self.rawValue }
    }

    public enum AutoTuneType: String, CustomStringConvertible, Codable {
        case scheduledAction = "SCHEDULED_ACTION"
        public var description: String { return self.rawValue }
    }

    public enum DeploymentStatus: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case eligible = "ELIGIBLE"
        case inProgress = "IN_PROGRESS"
        case notEligible = "NOT_ELIGIBLE"
        case pendingUpdate = "PENDING_UPDATE"
        public var description: String { return self.rawValue }
    }

    public enum DescribePackagesFilterName: String, CustomStringConvertible, Codable {
        case packageid = "PackageID"
        case packagename = "PackageName"
        case packagestatus = "PackageStatus"
        public var description: String { return self.rawValue }
    }

    public enum DomainPackageStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case associating = "ASSOCIATING"
        case associationFailed = "ASSOCIATION_FAILED"
        case dissociating = "DISSOCIATING"
        case dissociationFailed = "DISSOCIATION_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum ESPartitionInstanceType: String, CustomStringConvertible, Codable {
        case c42XlargeElasticsearch = "c4.2xlarge.elasticsearch"
        case c44XlargeElasticsearch = "c4.4xlarge.elasticsearch"
        case c48XlargeElasticsearch = "c4.8xlarge.elasticsearch"
        case c4LargeElasticsearch = "c4.large.elasticsearch"
        case c4XlargeElasticsearch = "c4.xlarge.elasticsearch"
        case c518XlargeElasticsearch = "c5.18xlarge.elasticsearch"
        case c52XlargeElasticsearch = "c5.2xlarge.elasticsearch"
        case c54XlargeElasticsearch = "c5.4xlarge.elasticsearch"
        case c59XlargeElasticsearch = "c5.9xlarge.elasticsearch"
        case c5LargeElasticsearch = "c5.large.elasticsearch"
        case c5XlargeElasticsearch = "c5.xlarge.elasticsearch"
        case d22XlargeElasticsearch = "d2.2xlarge.elasticsearch"
        case d24XlargeElasticsearch = "d2.4xlarge.elasticsearch"
        case d28XlargeElasticsearch = "d2.8xlarge.elasticsearch"
        case d2XlargeElasticsearch = "d2.xlarge.elasticsearch"
        case i22XlargeElasticsearch = "i2.2xlarge.elasticsearch"
        case i2XlargeElasticsearch = "i2.xlarge.elasticsearch"
        case i316XlargeElasticsearch = "i3.16xlarge.elasticsearch"
        case i32XlargeElasticsearch = "i3.2xlarge.elasticsearch"
        case i34XlargeElasticsearch = "i3.4xlarge.elasticsearch"
        case i38XlargeElasticsearch = "i3.8xlarge.elasticsearch"
        case i3LargeElasticsearch = "i3.large.elasticsearch"
        case i3XlargeElasticsearch = "i3.xlarge.elasticsearch"
        case m32XlargeElasticsearch = "m3.2xlarge.elasticsearch"
        case m3LargeElasticsearch = "m3.large.elasticsearch"
        case m3MediumElasticsearch = "m3.medium.elasticsearch"
        case m3XlargeElasticsearch = "m3.xlarge.elasticsearch"
        case m410XlargeElasticsearch = "m4.10xlarge.elasticsearch"
        case m42XlargeElasticsearch = "m4.2xlarge.elasticsearch"
        case m44XlargeElasticsearch = "m4.4xlarge.elasticsearch"
        case m4LargeElasticsearch = "m4.large.elasticsearch"
        case m4XlargeElasticsearch = "m4.xlarge.elasticsearch"
        case m512XlargeElasticsearch = "m5.12xlarge.elasticsearch"
        case m52XlargeElasticsearch = "m5.2xlarge.elasticsearch"
        case m54XlargeElasticsearch = "m5.4xlarge.elasticsearch"
        case m5LargeElasticsearch = "m5.large.elasticsearch"
        case m5XlargeElasticsearch = "m5.xlarge.elasticsearch"
        case r32XlargeElasticsearch = "r3.2xlarge.elasticsearch"
        case r34XlargeElasticsearch = "r3.4xlarge.elasticsearch"
        case r38XlargeElasticsearch = "r3.8xlarge.elasticsearch"
        case r3LargeElasticsearch = "r3.large.elasticsearch"
        case r3XlargeElasticsearch = "r3.xlarge.elasticsearch"
        case r416XlargeElasticsearch = "r4.16xlarge.elasticsearch"
        case r42XlargeElasticsearch = "r4.2xlarge.elasticsearch"
        case r44XlargeElasticsearch = "r4.4xlarge.elasticsearch"
        case r48XlargeElasticsearch = "r4.8xlarge.elasticsearch"
        case r4LargeElasticsearch = "r4.large.elasticsearch"
        case r4XlargeElasticsearch = "r4.xlarge.elasticsearch"
        case r512XlargeElasticsearch = "r5.12xlarge.elasticsearch"
        case r52XlargeElasticsearch = "r5.2xlarge.elasticsearch"
        case r54XlargeElasticsearch = "r5.4xlarge.elasticsearch"
        case r5LargeElasticsearch = "r5.large.elasticsearch"
        case r5XlargeElasticsearch = "r5.xlarge.elasticsearch"
        case t2MediumElasticsearch = "t2.medium.elasticsearch"
        case t2MicroElasticsearch = "t2.micro.elasticsearch"
        case t2SmallElasticsearch = "t2.small.elasticsearch"
        case ultrawarm1LargeElasticsearch = "ultrawarm1.large.elasticsearch"
        case ultrawarm1MediumElasticsearch = "ultrawarm1.medium.elasticsearch"
        public var description: String { return self.rawValue }
    }

    public enum ESWarmPartitionInstanceType: String, CustomStringConvertible, Codable {
        case ultrawarm1LargeElasticsearch = "ultrawarm1.large.elasticsearch"
        case ultrawarm1MediumElasticsearch = "ultrawarm1.medium.elasticsearch"
        public var description: String { return self.rawValue }
    }

    public enum InboundCrossClusterSearchConnectionStatusCode: String, CustomStringConvertible, Codable {
        case approved = "APPROVED"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case pendingAcceptance = "PENDING_ACCEPTANCE"
        case rejected = "REJECTED"
        case rejecting = "REJECTING"
        public var description: String { return self.rawValue }
    }

    public enum LogType: String, CustomStringConvertible, Codable {
        case auditLogs = "AUDIT_LOGS"
        case esApplicationLogs = "ES_APPLICATION_LOGS"
        case indexSlowLogs = "INDEX_SLOW_LOGS"
        case searchSlowLogs = "SEARCH_SLOW_LOGS"
        public var description: String { return self.rawValue }
    }

    public enum OptionState: String, CustomStringConvertible, Codable {
        case active = "Active"
        case processing = "Processing"
        case requiresindexdocuments = "RequiresIndexDocuments"
        public var description: String { return self.rawValue }
    }

    public enum OutboundCrossClusterSearchConnectionStatusCode: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case pendingAcceptance = "PENDING_ACCEPTANCE"
        case provisioning = "PROVISIONING"
        case rejected = "REJECTED"
        case validating = "VALIDATING"
        case validationFailed = "VALIDATION_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum PackageStatus: String, CustomStringConvertible, Codable {
        case available = "AVAILABLE"
        case copyFailed = "COPY_FAILED"
        case copying = "COPYING"
        case deleteFailed = "DELETE_FAILED"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case validating = "VALIDATING"
        case validationFailed = "VALIDATION_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum PackageType: String, CustomStringConvertible, Codable {
        case txtDictionary = "TXT-DICTIONARY"
        public var description: String { return self.rawValue }
    }

    public enum ReservedElasticsearchInstancePaymentOption: String, CustomStringConvertible, Codable {
        case allUpfront = "ALL_UPFRONT"
        case noUpfront = "NO_UPFRONT"
        case partialUpfront = "PARTIAL_UPFRONT"
        public var description: String { return self.rawValue }
    }

    public enum RollbackOnDisable: String, CustomStringConvertible, Codable {
        case defaultRollback = "DEFAULT_ROLLBACK"
        case noRollback = "NO_ROLLBACK"
        public var description: String { return self.rawValue }
    }

    public enum ScheduledAutoTuneActionType: String, CustomStringConvertible, Codable {
        case jvmHeapSizeTuning = "JVM_HEAP_SIZE_TUNING"
        case jvmYoungGenTuning = "JVM_YOUNG_GEN_TUNING"
        public var description: String { return self.rawValue }
    }

    public enum ScheduledAutoTuneSeverityType: String, CustomStringConvertible, Codable {
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        public var description: String { return self.rawValue }
    }

    public enum TLSSecurityPolicy: String, CustomStringConvertible, Codable {
        case policyMinTls10201907 = "Policy-Min-TLS-1-0-2019-07"
        case policyMinTls12201907 = "Policy-Min-TLS-1-2-2019-07"
        public var description: String { return self.rawValue }
    }

    public enum TimeUnit: String, CustomStringConvertible, Codable {
        case hours = "HOURS"
        public var description: String { return self.rawValue }
    }

    public enum UpgradeStatus: String, CustomStringConvertible, Codable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case succeeded = "SUCCEEDED"
        case succeededWithIssues = "SUCCEEDED_WITH_ISSUES"
        public var description: String { return self.rawValue }
    }

    public enum UpgradeStep: String, CustomStringConvertible, Codable {
        case preUpgradeCheck = "PRE_UPGRADE_CHECK"
        case snapshot = "SNAPSHOT"
        case upgrade = "UPGRADE"
        public var description: String { return self.rawValue }
    }

    public enum VolumeType: String, CustomStringConvertible, Codable {
        case gp2
        case io1
        case standard
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AcceptInboundCrossClusterSearchConnectionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "crossClusterSearchConnectionId", location: .uri(locationName: "ConnectionId"))
        ]

        /// The id of the inbound connection that you want to accept.
        public let crossClusterSearchConnectionId: String

        public init(crossClusterSearchConnectionId: String) {
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AcceptInboundCrossClusterSearchConnectionResponse: AWSDecodableShape {
        /// Specifies the InboundCrossClusterSearchConnection of accepted inbound connection.
        public let crossClusterSearchConnection: InboundCrossClusterSearchConnection?

        public init(crossClusterSearchConnection: InboundCrossClusterSearchConnection? = nil) {
            self.crossClusterSearchConnection = crossClusterSearchConnection
        }

        private enum CodingKeys: String, CodingKey {
            case crossClusterSearchConnection = "CrossClusterSearchConnection"
        }
    }

    public struct AccessPoliciesStatus: AWSDecodableShape {
        /// The access policy configured for the Elasticsearch domain. Access policies may be resource-based, IP-based, or IAM-based. See  Configuring Access Policiesfor more information.
        public let options: String
        /// The status of the access policy for the Elasticsearch domain. See OptionStatus for the status information that's included.
        public let status: OptionStatus

        public init(options: String, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct AddTagsRequest: AWSEncodableShape {
        ///  Specify the ARN for which you want to add the tags.
        public let arn: String
        ///  List of Tag that need to be added for the Elasticsearch domain.
        public let tagList: [Tag]

        public init(arn: String, tagList: [Tag]) {
            self.arn = arn
            self.tagList = tagList
        }

        public func validate(name: String) throws {
            try self.tagList.forEach {
                try $0.validate(name: "\(name).tagList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case tagList = "TagList"
        }
    }

    public struct AdditionalLimit: AWSDecodableShape {
        ///  Name of Additional Limit is specific to a given InstanceType and for each of it's  InstanceRole  etc.  Attributes and their details:   MaximumNumberOfDataNodesSupported This attribute will be present in Master node only to specify how much data nodes upto which given  ESPartitionInstanceType  can support as master node. MaximumNumberOfDataNodesWithoutMasterNode This attribute will be present in Data node only to specify how much data nodes of given  ESPartitionInstanceType  upto which you don't need any master nodes to govern them.
        public let limitName: String?
        ///  Value for given  AdditionalLimit$LimitName  .
        public let limitValues: [String]?

        public init(limitName: String? = nil, limitValues: [String]? = nil) {
            self.limitName = limitName
            self.limitValues = limitValues
        }

        private enum CodingKeys: String, CodingKey {
            case limitName = "LimitName"
            case limitValues = "LimitValues"
        }
    }

    public struct AdvancedOptionsStatus: AWSDecodableShape {
        ///  Specifies the status of advanced options for the specified Elasticsearch domain.
        public let options: [String: String]
        ///  Specifies the status of OptionStatus for advanced options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: [String: String], status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct AdvancedSecurityOptions: AWSDecodableShape {
        /// True if advanced security is enabled.
        public let enabled: Bool?
        /// True if the internal user database is enabled.
        public let internalUserDatabaseEnabled: Bool?
        /// Describes the SAML application configured for a domain.
        public let sAMLOptions: SAMLOptionsOutput?

        public init(enabled: Bool? = nil, internalUserDatabaseEnabled: Bool? = nil, sAMLOptions: SAMLOptionsOutput? = nil) {
            self.enabled = enabled
            self.internalUserDatabaseEnabled = internalUserDatabaseEnabled
            self.sAMLOptions = sAMLOptions
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case internalUserDatabaseEnabled = "InternalUserDatabaseEnabled"
            case sAMLOptions = "SAMLOptions"
        }
    }

    public struct AdvancedSecurityOptionsInput: AWSEncodableShape {
        /// True if advanced security is enabled.
        public let enabled: Bool?
        /// True if the internal user database is enabled.
        public let internalUserDatabaseEnabled: Bool?
        /// Credentials for the master user: username and password, ARN, or both.
        public let masterUserOptions: MasterUserOptions?
        /// Specifies the SAML application configuration for the domain.
        public let sAMLOptions: SAMLOptionsInput?

        public init(enabled: Bool? = nil, internalUserDatabaseEnabled: Bool? = nil, masterUserOptions: MasterUserOptions? = nil, sAMLOptions: SAMLOptionsInput? = nil) {
            self.enabled = enabled
            self.internalUserDatabaseEnabled = internalUserDatabaseEnabled
            self.masterUserOptions = masterUserOptions
            self.sAMLOptions = sAMLOptions
        }

        public func validate(name: String) throws {
            try self.masterUserOptions?.validate(name: "\(name).masterUserOptions")
            try self.sAMLOptions?.validate(name: "\(name).sAMLOptions")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case internalUserDatabaseEnabled = "InternalUserDatabaseEnabled"
            case masterUserOptions = "MasterUserOptions"
            case sAMLOptions = "SAMLOptions"
        }
    }

    public struct AdvancedSecurityOptionsStatus: AWSDecodableShape {
        ///  Specifies advanced security options for the specified Elasticsearch domain.
        public let options: AdvancedSecurityOptions
        ///  Status of the advanced security options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: AdvancedSecurityOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct AssociatePackageRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName")),
            AWSMemberEncoding(label: "packageID", location: .uri(locationName: "PackageID"))
        ]

        /// Name of the domain that you want to associate the package with.
        public let domainName: String
        /// Internal ID of the package that you want to associate with a domain. Use DescribePackages to find this value.
        public let packageID: String

        public init(domainName: String, packageID: String) {
            self.domainName = domainName
            self.packageID = packageID
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociatePackageResponse: AWSDecodableShape {
        /// DomainPackageDetails
        public let domainPackageDetails: DomainPackageDetails?

        public init(domainPackageDetails: DomainPackageDetails? = nil) {
            self.domainPackageDetails = domainPackageDetails
        }

        private enum CodingKeys: String, CodingKey {
            case domainPackageDetails = "DomainPackageDetails"
        }
    }

    public struct AutoTune: AWSDecodableShape {
        /// Specifies details of the Auto-Tune action. See the Developer Guide for more information.
        public let autoTuneDetails: AutoTuneDetails?
        /// Specifies Auto-Tune type. Valid value is SCHEDULED_ACTION.
        public let autoTuneType: AutoTuneType?

        public init(autoTuneDetails: AutoTuneDetails? = nil, autoTuneType: AutoTuneType? = nil) {
            self.autoTuneDetails = autoTuneDetails
            self.autoTuneType = autoTuneType
        }

        private enum CodingKeys: String, CodingKey {
            case autoTuneDetails = "AutoTuneDetails"
            case autoTuneType = "AutoTuneType"
        }
    }

    public struct AutoTuneDetails: AWSDecodableShape {
        public let scheduledAutoTuneDetails: ScheduledAutoTuneDetails?

        public init(scheduledAutoTuneDetails: ScheduledAutoTuneDetails? = nil) {
            self.scheduledAutoTuneDetails = scheduledAutoTuneDetails
        }

        private enum CodingKeys: String, CodingKey {
            case scheduledAutoTuneDetails = "ScheduledAutoTuneDetails"
        }
    }

    public struct AutoTuneMaintenanceSchedule: AWSEncodableShape & AWSDecodableShape {
        /// Specifies cron expression for a recurring maintenance schedule. See the Developer Guide for more information.
        public let cronExpressionForRecurrence: String?
        /// Specifies maintenance schedule duration: duration value and duration unit. See the Developer Guide for more information.
        public let duration: Duration?
        /// Specifies timestamp at which Auto-Tune maintenance schedule start.
        public let startAt: Date?

        public init(cronExpressionForRecurrence: String? = nil, duration: Duration? = nil, startAt: Date? = nil) {
            self.cronExpressionForRecurrence = cronExpressionForRecurrence
            self.duration = duration
            self.startAt = startAt
        }

        public func validate(name: String) throws {
            try self.duration?.validate(name: "\(name).duration")
        }

        private enum CodingKeys: String, CodingKey {
            case cronExpressionForRecurrence = "CronExpressionForRecurrence"
            case duration = "Duration"
            case startAt = "StartAt"
        }
    }

    public struct AutoTuneOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the Auto-Tune desired state. Valid values are ENABLED, DISABLED.
        public let desiredState: AutoTuneDesiredState?
        /// Specifies list of maitenance schedules. See the Developer Guide for more information.
        public let maintenanceSchedules: [AutoTuneMaintenanceSchedule]?
        /// Specifies the rollback state while disabling Auto-Tune for the domain. Valid values are NO_ROLLBACK, DEFAULT_ROLLBACK.
        public let rollbackOnDisable: RollbackOnDisable?

        public init(desiredState: AutoTuneDesiredState? = nil, maintenanceSchedules: [AutoTuneMaintenanceSchedule]? = nil, rollbackOnDisable: RollbackOnDisable? = nil) {
            self.desiredState = desiredState
            self.maintenanceSchedules = maintenanceSchedules
            self.rollbackOnDisable = rollbackOnDisable
        }

        public func validate(name: String) throws {
            try self.maintenanceSchedules?.forEach {
                try $0.validate(name: "\(name).maintenanceSchedules[]")
            }
            try self.validate(self.maintenanceSchedules, name: "maintenanceSchedules", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case desiredState = "DesiredState"
            case maintenanceSchedules = "MaintenanceSchedules"
            case rollbackOnDisable = "RollbackOnDisable"
        }
    }

    public struct AutoTuneOptionsInput: AWSEncodableShape {
        /// Specifies the Auto-Tune desired state. Valid values are ENABLED, DISABLED.
        public let desiredState: AutoTuneDesiredState?
        /// Specifies list of maitenance schedules. See the Developer Guide for more information.
        public let maintenanceSchedules: [AutoTuneMaintenanceSchedule]?

        public init(desiredState: AutoTuneDesiredState? = nil, maintenanceSchedules: [AutoTuneMaintenanceSchedule]? = nil) {
            self.desiredState = desiredState
            self.maintenanceSchedules = maintenanceSchedules
        }

        public func validate(name: String) throws {
            try self.maintenanceSchedules?.forEach {
                try $0.validate(name: "\(name).maintenanceSchedules[]")
            }
            try self.validate(self.maintenanceSchedules, name: "maintenanceSchedules", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case desiredState = "DesiredState"
            case maintenanceSchedules = "MaintenanceSchedules"
        }
    }

    public struct AutoTuneOptionsOutput: AWSDecodableShape {
        /// Specifies the error message while enabling or disabling the Auto-Tune.
        public let errorMessage: String?
        /// Specifies the AutoTuneState for the Elasticsearch domain.
        public let state: AutoTuneState?

        public init(errorMessage: String? = nil, state: AutoTuneState? = nil) {
            self.errorMessage = errorMessage
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case errorMessage = "ErrorMessage"
            case state = "State"
        }
    }

    public struct AutoTuneOptionsStatus: AWSDecodableShape {
        ///  Specifies Auto-Tune options for the specified Elasticsearch domain.
        public let options: AutoTuneOptions?
        ///  Specifies Status of the Auto-Tune options for the specified Elasticsearch domain.
        public let status: AutoTuneStatus?

        public init(options: AutoTuneOptions? = nil, status: AutoTuneStatus? = nil) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct AutoTuneStatus: AWSDecodableShape {
        /// Timestamp which tells Auto-Tune options creation date .
        public let creationDate: Date
        /// Specifies the error message while enabling or disabling the Auto-Tune options.
        public let errorMessage: String?
        /// Indicates whether the Elasticsearch domain is being deleted.
        public let pendingDeletion: Bool?
        /// Specifies the AutoTuneState for the Elasticsearch domain.
        public let state: AutoTuneState
        /// Timestamp which tells Auto-Tune options last updated time.
        public let updateDate: Date
        /// Specifies the Auto-Tune options latest version.
        public let updateVersion: Int?

        public init(creationDate: Date, errorMessage: String? = nil, pendingDeletion: Bool? = nil, state: AutoTuneState, updateDate: Date, updateVersion: Int? = nil) {
            self.creationDate = creationDate
            self.errorMessage = errorMessage
            self.pendingDeletion = pendingDeletion
            self.state = state
            self.updateDate = updateDate
            self.updateVersion = updateVersion
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case errorMessage = "ErrorMessage"
            case pendingDeletion = "PendingDeletion"
            case state = "State"
            case updateDate = "UpdateDate"
            case updateVersion = "UpdateVersion"
        }
    }

    public struct CancelElasticsearchServiceSoftwareUpdateRequest: AWSEncodableShape {
        /// The name of the domain that you want to stop the latest service software update on.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
        }
    }

    public struct CancelElasticsearchServiceSoftwareUpdateResponse: AWSDecodableShape {
        /// The current status of the Elasticsearch service software update.
        public let serviceSoftwareOptions: ServiceSoftwareOptions?

        public init(serviceSoftwareOptions: ServiceSoftwareOptions? = nil) {
            self.serviceSoftwareOptions = serviceSoftwareOptions
        }

        private enum CodingKeys: String, CodingKey {
            case serviceSoftwareOptions = "ServiceSoftwareOptions"
        }
    }

    public struct CognitoOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the option to enable Cognito for Kibana authentication.
        public let enabled: Bool?
        /// Specifies the Cognito identity pool ID for Kibana authentication.
        public let identityPoolId: String?
        /// Specifies the role ARN that provides Elasticsearch permissions for accessing Cognito resources.
        public let roleArn: String?
        /// Specifies the Cognito user pool ID for Kibana authentication.
        public let userPoolId: String?

        public init(enabled: Bool? = nil, identityPoolId: String? = nil, roleArn: String? = nil, userPoolId: String? = nil) {
            self.enabled = enabled
            self.identityPoolId = identityPoolId
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityPoolId, name: "identityPoolId", parent: name, max: 55)
            try self.validate(self.identityPoolId, name: "identityPoolId", parent: name, min: 1)
            try self.validate(self.identityPoolId, name: "identityPoolId", parent: name, pattern: "[\\w-]+:[0-9a-f-]+")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case identityPoolId = "IdentityPoolId"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CognitoOptionsStatus: AWSDecodableShape {
        /// Specifies the Cognito options for the specified Elasticsearch domain.
        public let options: CognitoOptions
        /// Specifies the status of the Cognito options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: CognitoOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct CompatibleVersionsMap: AWSDecodableShape {
        /// The current version of Elasticsearch on which a domain is.
        public let sourceVersion: String?
        public let targetVersions: [String]?

        public init(sourceVersion: String? = nil, targetVersions: [String]? = nil) {
            self.sourceVersion = sourceVersion
            self.targetVersions = targetVersions
        }

        private enum CodingKeys: String, CodingKey {
            case sourceVersion = "SourceVersion"
            case targetVersions = "TargetVersions"
        }
    }

    public struct CreateElasticsearchDomainRequest: AWSEncodableShape {
        ///  IAM access policy as a JSON-formatted string.
        public let accessPolicies: String?
        ///  Option to allow references to indices in an HTTP request body. Must be false when configuring access to individual sub-resources. By default, the value is true. See Configuration Advanced Options for more information.
        public let advancedOptions: [String: String]?
        /// Specifies advanced security options.
        public let advancedSecurityOptions: AdvancedSecurityOptionsInput?
        /// Specifies Auto-Tune options.
        public let autoTuneOptions: AutoTuneOptionsInput?
        /// Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see Amazon Cognito Authentication for Kibana.
        public let cognitoOptions: CognitoOptions?
        /// Options to specify configuration that will be applied to the domain endpoint.
        public let domainEndpointOptions: DomainEndpointOptions?
        /// The name of the Elasticsearch domain that you are creating. Domain names are unique across the domains owned by an account within an AWS region. Domain names must start with a lowercase letter and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).
        public let domainName: String
        /// Options to enable, disable and specify the type and size of EBS storage volumes.
        public let eBSOptions: EBSOptions?
        /// Configuration options for an Elasticsearch domain. Specifies the instance type and number of instances in the domain cluster.
        public let elasticsearchClusterConfig: ElasticsearchClusterConfig?
        /// String of format X.Y to specify version for the Elasticsearch domain eg. "1.5" or "2.3". For more information, see Creating Elasticsearch Domains in the Amazon Elasticsearch Service Developer Guide.
        public let elasticsearchVersion: String?
        /// Specifies the Encryption At Rest Options.
        public let encryptionAtRestOptions: EncryptionAtRestOptions?
        /// Map of LogType and LogPublishingOption, each containing options to publish a given type of Elasticsearch log.
        public let logPublishingOptions: [LogType: LogPublishingOption]?
        /// Specifies the NodeToNodeEncryptionOptions.
        public let nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptions?
        /// Option to set time, in UTC format, of the daily automated snapshot. Default value is 0 hours.
        public let snapshotOptions: SnapshotOptions?
        /// Options to specify the subnets and security groups for VPC endpoint. For more information, see Creating a VPC in VPC Endpoints for Amazon Elasticsearch Service Domains
        public let vPCOptions: VPCOptions?

        public init(accessPolicies: String? = nil, advancedOptions: [String: String]? = nil, advancedSecurityOptions: AdvancedSecurityOptionsInput? = nil, autoTuneOptions: AutoTuneOptionsInput? = nil, cognitoOptions: CognitoOptions? = nil, domainEndpointOptions: DomainEndpointOptions? = nil, domainName: String, eBSOptions: EBSOptions? = nil, elasticsearchClusterConfig: ElasticsearchClusterConfig? = nil, elasticsearchVersion: String? = nil, encryptionAtRestOptions: EncryptionAtRestOptions? = nil, logPublishingOptions: [LogType: LogPublishingOption]? = nil, nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptions? = nil, snapshotOptions: SnapshotOptions? = nil, vPCOptions: VPCOptions? = nil) {
            self.accessPolicies = accessPolicies
            self.advancedOptions = advancedOptions
            self.advancedSecurityOptions = advancedSecurityOptions
            self.autoTuneOptions = autoTuneOptions
            self.cognitoOptions = cognitoOptions
            self.domainEndpointOptions = domainEndpointOptions
            self.domainName = domainName
            self.eBSOptions = eBSOptions
            self.elasticsearchClusterConfig = elasticsearchClusterConfig
            self.elasticsearchVersion = elasticsearchVersion
            self.encryptionAtRestOptions = encryptionAtRestOptions
            self.logPublishingOptions = logPublishingOptions
            self.nodeToNodeEncryptionOptions = nodeToNodeEncryptionOptions
            self.snapshotOptions = snapshotOptions
            self.vPCOptions = vPCOptions
        }

        public func validate(name: String) throws {
            try self.advancedSecurityOptions?.validate(name: "\(name).advancedSecurityOptions")
            try self.autoTuneOptions?.validate(name: "\(name).autoTuneOptions")
            try self.cognitoOptions?.validate(name: "\(name).cognitoOptions")
            try self.domainEndpointOptions?.validate(name: "\(name).domainEndpointOptions")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.encryptionAtRestOptions?.validate(name: "\(name).encryptionAtRestOptions")
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicies = "AccessPolicies"
            case advancedOptions = "AdvancedOptions"
            case advancedSecurityOptions = "AdvancedSecurityOptions"
            case autoTuneOptions = "AutoTuneOptions"
            case cognitoOptions = "CognitoOptions"
            case domainEndpointOptions = "DomainEndpointOptions"
            case domainName = "DomainName"
            case eBSOptions = "EBSOptions"
            case elasticsearchClusterConfig = "ElasticsearchClusterConfig"
            case elasticsearchVersion = "ElasticsearchVersion"
            case encryptionAtRestOptions = "EncryptionAtRestOptions"
            case logPublishingOptions = "LogPublishingOptions"
            case nodeToNodeEncryptionOptions = "NodeToNodeEncryptionOptions"
            case snapshotOptions = "SnapshotOptions"
            case vPCOptions = "VPCOptions"
        }
    }

    public struct CreateElasticsearchDomainResponse: AWSDecodableShape {
        /// The status of the newly created Elasticsearch domain.
        public let domainStatus: ElasticsearchDomainStatus?

        public init(domainStatus: ElasticsearchDomainStatus? = nil) {
            self.domainStatus = domainStatus
        }

        private enum CodingKeys: String, CodingKey {
            case domainStatus = "DomainStatus"
        }
    }

    public struct CreateOutboundCrossClusterSearchConnectionRequest: AWSEncodableShape {
        /// Specifies the connection alias that will be used by the customer for this connection.
        public let connectionAlias: String
        /// Specifies the DomainInformation for the destination Elasticsearch domain.
        public let destinationDomainInfo: DomainInformation
        /// Specifies the DomainInformation for the source Elasticsearch domain.
        public let sourceDomainInfo: DomainInformation

        public init(connectionAlias: String, destinationDomainInfo: DomainInformation, sourceDomainInfo: DomainInformation) {
            self.connectionAlias = connectionAlias
            self.destinationDomainInfo = destinationDomainInfo
            self.sourceDomainInfo = sourceDomainInfo
        }

        public func validate(name: String) throws {
            try self.validate(self.connectionAlias, name: "connectionAlias", parent: name, max: 20)
            try self.destinationDomainInfo.validate(name: "\(name).destinationDomainInfo")
            try self.sourceDomainInfo.validate(name: "\(name).sourceDomainInfo")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionAlias = "ConnectionAlias"
            case destinationDomainInfo = "DestinationDomainInfo"
            case sourceDomainInfo = "SourceDomainInfo"
        }
    }

    public struct CreateOutboundCrossClusterSearchConnectionResponse: AWSDecodableShape {
        /// Specifies the connection alias provided during the create connection request.
        public let connectionAlias: String?
        /// Specifies the OutboundCrossClusterSearchConnectionStatus for the newly created connection.
        public let connectionStatus: OutboundCrossClusterSearchConnectionStatus?
        /// Unique id for the created outbound connection, which is used for subsequent operations on connection.
        public let crossClusterSearchConnectionId: String?
        /// Specifies the DomainInformation for the destination Elasticsearch domain.
        public let destinationDomainInfo: DomainInformation?
        /// Specifies the DomainInformation for the source Elasticsearch domain.
        public let sourceDomainInfo: DomainInformation?

        public init(connectionAlias: String? = nil, connectionStatus: OutboundCrossClusterSearchConnectionStatus? = nil, crossClusterSearchConnectionId: String? = nil, destinationDomainInfo: DomainInformation? = nil, sourceDomainInfo: DomainInformation? = nil) {
            self.connectionAlias = connectionAlias
            self.connectionStatus = connectionStatus
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
            self.destinationDomainInfo = destinationDomainInfo
            self.sourceDomainInfo = sourceDomainInfo
        }

        private enum CodingKeys: String, CodingKey {
            case connectionAlias = "ConnectionAlias"
            case connectionStatus = "ConnectionStatus"
            case crossClusterSearchConnectionId = "CrossClusterSearchConnectionId"
            case destinationDomainInfo = "DestinationDomainInfo"
            case sourceDomainInfo = "SourceDomainInfo"
        }
    }

    public struct CreatePackageRequest: AWSEncodableShape {
        /// Description of the package.
        public let packageDescription: String?
        /// Unique identifier for the package.
        public let packageName: String
        /// The customer S3 location PackageSource for importing the package.
        public let packageSource: PackageSource
        /// Type of package. Currently supports only TXT-DICTIONARY.
        public let packageType: PackageType

        public init(packageDescription: String? = nil, packageName: String, packageSource: PackageSource, packageType: PackageType) {
            self.packageDescription = packageDescription
            self.packageName = packageName
            self.packageSource = packageSource
            self.packageType = packageType
        }

        public func validate(name: String) throws {
            try self.validate(self.packageDescription, name: "packageDescription", parent: name, max: 1024)
            try self.validate(self.packageName, name: "packageName", parent: name, max: 28)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 3)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.packageSource.validate(name: "\(name).packageSource")
        }

        private enum CodingKeys: String, CodingKey {
            case packageDescription = "PackageDescription"
            case packageName = "PackageName"
            case packageSource = "PackageSource"
            case packageType = "PackageType"
        }
    }

    public struct CreatePackageResponse: AWSDecodableShape {
        /// Information about the package PackageDetails.
        public let packageDetails: PackageDetails?

        public init(packageDetails: PackageDetails? = nil) {
            self.packageDetails = packageDetails
        }

        private enum CodingKeys: String, CodingKey {
            case packageDetails = "PackageDetails"
        }
    }

    public struct DeleteElasticsearchDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName"))
        ]

        /// The name of the Elasticsearch domain that you want to permanently delete.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteElasticsearchDomainResponse: AWSDecodableShape {
        /// The status of the Elasticsearch domain being deleted.
        public let domainStatus: ElasticsearchDomainStatus?

        public init(domainStatus: ElasticsearchDomainStatus? = nil) {
            self.domainStatus = domainStatus
        }

        private enum CodingKeys: String, CodingKey {
            case domainStatus = "DomainStatus"
        }
    }

    public struct DeleteInboundCrossClusterSearchConnectionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "crossClusterSearchConnectionId", location: .uri(locationName: "ConnectionId"))
        ]

        /// The id of the inbound connection that you want to permanently delete.
        public let crossClusterSearchConnectionId: String

        public init(crossClusterSearchConnectionId: String) {
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteInboundCrossClusterSearchConnectionResponse: AWSDecodableShape {
        /// Specifies the InboundCrossClusterSearchConnection of deleted inbound connection.
        public let crossClusterSearchConnection: InboundCrossClusterSearchConnection?

        public init(crossClusterSearchConnection: InboundCrossClusterSearchConnection? = nil) {
            self.crossClusterSearchConnection = crossClusterSearchConnection
        }

        private enum CodingKeys: String, CodingKey {
            case crossClusterSearchConnection = "CrossClusterSearchConnection"
        }
    }

    public struct DeleteOutboundCrossClusterSearchConnectionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "crossClusterSearchConnectionId", location: .uri(locationName: "ConnectionId"))
        ]

        /// The id of the outbound connection that you want to permanently delete.
        public let crossClusterSearchConnectionId: String

        public init(crossClusterSearchConnectionId: String) {
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteOutboundCrossClusterSearchConnectionResponse: AWSDecodableShape {
        /// Specifies the OutboundCrossClusterSearchConnection of deleted outbound connection.
        public let crossClusterSearchConnection: OutboundCrossClusterSearchConnection?

        public init(crossClusterSearchConnection: OutboundCrossClusterSearchConnection? = nil) {
            self.crossClusterSearchConnection = crossClusterSearchConnection
        }

        private enum CodingKeys: String, CodingKey {
            case crossClusterSearchConnection = "CrossClusterSearchConnection"
        }
    }

    public struct DeletePackageRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "packageID", location: .uri(locationName: "PackageID"))
        ]

        /// Internal ID of the package that you want to delete. Use DescribePackages to find this value.
        public let packageID: String

        public init(packageID: String) {
            self.packageID = packageID
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeletePackageResponse: AWSDecodableShape {
        /// PackageDetails
        public let packageDetails: PackageDetails?

        public init(packageDetails: PackageDetails? = nil) {
            self.packageDetails = packageDetails
        }

        private enum CodingKeys: String, CodingKey {
            case packageDetails = "PackageDetails"
        }
    }

    public struct DescribeDomainAutoTunesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName"))
        ]

        /// Specifies the domain name for which you want Auto-Tune action details.
        public let domainName: String
        /// Set this value to limit the number of results returned. If not specified, defaults to 100.
        public let maxResults: Int?
        /// NextToken is sent in case the earlier API call results contain the NextToken. It is used for pagination.
        public let nextToken: String?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeDomainAutoTunesResponse: AWSDecodableShape {
        /// Specifies the list of setting adjustments that Auto-Tune has made to the domain. See the Developer Guide for more information.
        public let autoTunes: [AutoTune]?
        /// Specifies an identifier to allow retrieval of paginated results.
        public let nextToken: String?

        public init(autoTunes: [AutoTune]? = nil, nextToken: String? = nil) {
            self.autoTunes = autoTunes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case autoTunes = "AutoTunes"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeElasticsearchDomainConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName"))
        ]

        /// The Elasticsearch domain that you want to get information about.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeElasticsearchDomainConfigResponse: AWSDecodableShape {
        /// The configuration information of the domain requested in the DescribeElasticsearchDomainConfig request.
        public let domainConfig: ElasticsearchDomainConfig

        public init(domainConfig: ElasticsearchDomainConfig) {
            self.domainConfig = domainConfig
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfig = "DomainConfig"
        }
    }

    public struct DescribeElasticsearchDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName"))
        ]

        /// The name of the Elasticsearch domain for which you want information.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeElasticsearchDomainResponse: AWSDecodableShape {
        /// The current status of the Elasticsearch domain.
        public let domainStatus: ElasticsearchDomainStatus

        public init(domainStatus: ElasticsearchDomainStatus) {
            self.domainStatus = domainStatus
        }

        private enum CodingKeys: String, CodingKey {
            case domainStatus = "DomainStatus"
        }
    }

    public struct DescribeElasticsearchDomainsRequest: AWSEncodableShape {
        /// The Elasticsearch domains for which you want information.
        public let domainNames: [String]

        public init(domainNames: [String]) {
            self.domainNames = domainNames
        }

        public func validate(name: String) throws {
            try self.domainNames.forEach {
                try validate($0, name: "domainNames[]", parent: name, max: 28)
                try validate($0, name: "domainNames[]", parent: name, min: 3)
                try validate($0, name: "domainNames[]", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case domainNames = "DomainNames"
        }
    }

    public struct DescribeElasticsearchDomainsResponse: AWSDecodableShape {
        /// The status of the domains requested in the DescribeElasticsearchDomains request.
        public let domainStatusList: [ElasticsearchDomainStatus]

        public init(domainStatusList: [ElasticsearchDomainStatus]) {
            self.domainStatusList = domainStatusList
        }

        private enum CodingKeys: String, CodingKey {
            case domainStatusList = "DomainStatusList"
        }
    }

    public struct DescribeElasticsearchInstanceTypeLimitsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .querystring(locationName: "domainName")),
            AWSMemberEncoding(label: "elasticsearchVersion", location: .uri(locationName: "ElasticsearchVersion")),
            AWSMemberEncoding(label: "instanceType", location: .uri(locationName: "InstanceType"))
        ]

        ///  DomainName represents the name of the Domain that we are trying to modify. This should be present only if we are querying for Elasticsearch  Limits  for existing domain.
        public let domainName: String?
        ///  Version of Elasticsearch for which  Limits  are needed.
        public let elasticsearchVersion: String
        ///  The instance type for an Elasticsearch cluster for which Elasticsearch  Limits  are needed.
        public let instanceType: ESPartitionInstanceType

        public init(domainName: String? = nil, elasticsearchVersion: String, instanceType: ESPartitionInstanceType) {
            self.domainName = domainName
            self.elasticsearchVersion = elasticsearchVersion
            self.instanceType = instanceType
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeElasticsearchInstanceTypeLimitsResponse: AWSDecodableShape {
        public let limitsByRole: [String: Limits]?

        public init(limitsByRole: [String: Limits]? = nil) {
            self.limitsByRole = limitsByRole
        }

        private enum CodingKeys: String, CodingKey {
            case limitsByRole = "LimitsByRole"
        }
    }

    public struct DescribeInboundCrossClusterSearchConnectionsRequest: AWSEncodableShape {
        ///  A list of filters used to match properties for inbound cross-cluster search connection. Available Filter names for this operation are:  cross-cluster-search-connection-id source-domain-info.domain-name source-domain-info.owner-id source-domain-info.region destination-domain-info.domain-name
        public let filters: [Filter]?
        /// Set this value to limit the number of results returned. If not specified, defaults to 100.
        public let maxResults: Int?
        ///  NextToken is sent in case the earlier API call results contain the NextToken. It is used for pagination.
        public let nextToken: String?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeInboundCrossClusterSearchConnectionsResponse: AWSDecodableShape {
        /// Consists of list of InboundCrossClusterSearchConnection matching the specified filter criteria.
        public let crossClusterSearchConnections: [InboundCrossClusterSearchConnection]?
        /// If more results are available and NextToken is present, make the next request to the same API with the received NextToken to paginate the remaining results.
        public let nextToken: String?

        public init(crossClusterSearchConnections: [InboundCrossClusterSearchConnection]? = nil, nextToken: String? = nil) {
            self.crossClusterSearchConnections = crossClusterSearchConnections
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case crossClusterSearchConnections = "CrossClusterSearchConnections"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeOutboundCrossClusterSearchConnectionsRequest: AWSEncodableShape {
        ///  A list of filters used to match properties for outbound cross-cluster search connection. Available Filter names for this operation are:  cross-cluster-search-connection-id destination-domain-info.domain-name destination-domain-info.owner-id destination-domain-info.region source-domain-info.domain-name
        public let filters: [Filter]?
        /// Set this value to limit the number of results returned. If not specified, defaults to 100.
        public let maxResults: Int?
        ///  NextToken is sent in case the earlier API call results contain the NextToken. It is used for pagination.
        public let nextToken: String?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeOutboundCrossClusterSearchConnectionsResponse: AWSDecodableShape {
        /// Consists of list of OutboundCrossClusterSearchConnection matching the specified filter criteria.
        public let crossClusterSearchConnections: [OutboundCrossClusterSearchConnection]?
        /// If more results are available and NextToken is present, make the next request to the same API with the received NextToken to paginate the remaining results.
        public let nextToken: String?

        public init(crossClusterSearchConnections: [OutboundCrossClusterSearchConnection]? = nil, nextToken: String? = nil) {
            self.crossClusterSearchConnections = crossClusterSearchConnections
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case crossClusterSearchConnections = "CrossClusterSearchConnections"
            case nextToken = "NextToken"
        }
    }

    public struct DescribePackagesFilter: AWSEncodableShape {
        /// Any field from PackageDetails.
        public let name: DescribePackagesFilterName?
        /// A list of values for the specified field.
        public let value: [String]?

        public init(name: DescribePackagesFilterName? = nil, value: [String]? = nil) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.value?.forEach {
                try validate($0, name: "value[]", parent: name, pattern: "^[0-9a-zA-Z\\*\\.\\\\/\\?-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct DescribePackagesRequest: AWSEncodableShape {
        /// Only returns packages that match the DescribePackagesFilterList values.
        public let filters: [DescribePackagesFilter]?
        /// Limits results to a maximum number of packages.
        public let maxResults: Int?
        /// Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.
        public let nextToken: String?

        public init(filters: [DescribePackagesFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribePackagesResponse: AWSDecodableShape {
        public let nextToken: String?
        /// List of PackageDetails objects.
        public let packageDetailsList: [PackageDetails]?

        public init(nextToken: String? = nil, packageDetailsList: [PackageDetails]? = nil) {
            self.nextToken = nextToken
            self.packageDetailsList = packageDetailsList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case packageDetailsList = "PackageDetailsList"
        }
    }

    public struct DescribeReservedElasticsearchInstanceOfferingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "reservedElasticsearchInstanceOfferingId", location: .querystring(locationName: "offeringId"))
        ]

        /// Set this value to limit the number of results returned. If not specified, defaults to 100.
        public let maxResults: Int?
        /// NextToken should be sent in case if earlier API call produced result containing NextToken. It is used for pagination.
        public let nextToken: String?
        /// The offering identifier filter value. Use this parameter to show only the available offering that matches the specified reservation identifier.
        public let reservedElasticsearchInstanceOfferingId: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, reservedElasticsearchInstanceOfferingId: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.reservedElasticsearchInstanceOfferingId = reservedElasticsearchInstanceOfferingId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.reservedElasticsearchInstanceOfferingId, name: "reservedElasticsearchInstanceOfferingId", parent: name, pattern: "\\p{XDigit}{8}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{12}")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeReservedElasticsearchInstanceOfferingsResponse: AWSDecodableShape {
        /// Provides an identifier to allow retrieval of paginated results.
        public let nextToken: String?
        /// List of reserved Elasticsearch instance offerings
        public let reservedElasticsearchInstanceOfferings: [ReservedElasticsearchInstanceOffering]?

        public init(nextToken: String? = nil, reservedElasticsearchInstanceOfferings: [ReservedElasticsearchInstanceOffering]? = nil) {
            self.nextToken = nextToken
            self.reservedElasticsearchInstanceOfferings = reservedElasticsearchInstanceOfferings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case reservedElasticsearchInstanceOfferings = "ReservedElasticsearchInstanceOfferings"
        }
    }

    public struct DescribeReservedElasticsearchInstancesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "reservedElasticsearchInstanceId", location: .querystring(locationName: "reservationId"))
        ]

        /// Set this value to limit the number of results returned. If not specified, defaults to 100.
        public let maxResults: Int?
        /// NextToken should be sent in case if earlier API call produced result containing NextToken. It is used for pagination.
        public let nextToken: String?
        /// The reserved instance identifier filter value. Use this parameter to show only the reservation that matches the specified reserved Elasticsearch instance ID.
        public let reservedElasticsearchInstanceId: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, reservedElasticsearchInstanceId: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.reservedElasticsearchInstanceId = reservedElasticsearchInstanceId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.reservedElasticsearchInstanceId, name: "reservedElasticsearchInstanceId", parent: name, pattern: "\\p{XDigit}{8}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{12}")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeReservedElasticsearchInstancesResponse: AWSDecodableShape {
        /// Provides an identifier to allow retrieval of paginated results.
        public let nextToken: String?
        /// List of reserved Elasticsearch instances.
        public let reservedElasticsearchInstances: [ReservedElasticsearchInstance]?

        public init(nextToken: String? = nil, reservedElasticsearchInstances: [ReservedElasticsearchInstance]? = nil) {
            self.nextToken = nextToken
            self.reservedElasticsearchInstances = reservedElasticsearchInstances
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case reservedElasticsearchInstances = "ReservedElasticsearchInstances"
        }
    }

    public struct DissociatePackageRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName")),
            AWSMemberEncoding(label: "packageID", location: .uri(locationName: "PackageID"))
        ]

        /// Name of the domain that you want to associate the package with.
        public let domainName: String
        /// Internal ID of the package that you want to associate with a domain. Use DescribePackages to find this value.
        public let packageID: String

        public init(domainName: String, packageID: String) {
            self.domainName = domainName
            self.packageID = packageID
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DissociatePackageResponse: AWSDecodableShape {
        /// DomainPackageDetails
        public let domainPackageDetails: DomainPackageDetails?

        public init(domainPackageDetails: DomainPackageDetails? = nil) {
            self.domainPackageDetails = domainPackageDetails
        }

        private enum CodingKeys: String, CodingKey {
            case domainPackageDetails = "DomainPackageDetails"
        }
    }

    public struct DomainEndpointOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specify the fully qualified domain for your custom endpoint.
        public let customEndpoint: String?
        /// Specify ACM certificate ARN for your custom endpoint.
        public let customEndpointCertificateArn: String?
        /// Specify if custom endpoint should be enabled for the Elasticsearch domain.
        public let customEndpointEnabled: Bool?
        /// Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain.
        public let enforceHTTPS: Bool?
        /// Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.  It can be one of the following values:  Policy-Min-TLS-1-0-2019-07:  TLS security policy which supports TLSv1.0 and higher. Policy-Min-TLS-1-2-2019-07:  TLS security policy which supports only TLSv1.2
        public let tLSSecurityPolicy: TLSSecurityPolicy?

        public init(customEndpoint: String? = nil, customEndpointCertificateArn: String? = nil, customEndpointEnabled: Bool? = nil, enforceHTTPS: Bool? = nil, tLSSecurityPolicy: TLSSecurityPolicy? = nil) {
            self.customEndpoint = customEndpoint
            self.customEndpointCertificateArn = customEndpointCertificateArn
            self.customEndpointEnabled = customEndpointEnabled
            self.enforceHTTPS = enforceHTTPS
            self.tLSSecurityPolicy = tLSSecurityPolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.customEndpoint, name: "customEndpoint", parent: name, max: 255)
            try self.validate(self.customEndpoint, name: "customEndpoint", parent: name, min: 1)
            try self.validate(self.customEndpoint, name: "customEndpoint", parent: name, pattern: "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$")
        }

        private enum CodingKeys: String, CodingKey {
            case customEndpoint = "CustomEndpoint"
            case customEndpointCertificateArn = "CustomEndpointCertificateArn"
            case customEndpointEnabled = "CustomEndpointEnabled"
            case enforceHTTPS = "EnforceHTTPS"
            case tLSSecurityPolicy = "TLSSecurityPolicy"
        }
    }

    public struct DomainEndpointOptionsStatus: AWSDecodableShape {
        /// Options to configure endpoint for the Elasticsearch domain.
        public let options: DomainEndpointOptions
        /// The status of the endpoint options for the Elasticsearch domain. See OptionStatus for the status information that's included.
        public let status: OptionStatus

        public init(options: DomainEndpointOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct DomainInfo: AWSDecodableShape {
        ///  Specifies the DomainName.
        public let domainName: String?

        public init(domainName: String? = nil) {
            self.domainName = domainName
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
        }
    }

    public struct DomainInformation: AWSEncodableShape & AWSDecodableShape {
        public let domainName: String
        public let ownerId: String?
        public let region: String?

        public init(domainName: String, ownerId: String? = nil, region: String? = nil) {
            self.domainName = domainName
            self.ownerId = ownerId
            self.region = region
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.validate(self.ownerId, name: "ownerId", parent: name, max: 12)
            try self.validate(self.ownerId, name: "ownerId", parent: name, min: 12)
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
            case ownerId = "OwnerId"
            case region = "Region"
        }
    }

    public struct DomainPackageDetails: AWSDecodableShape {
        /// Name of the domain you've associated a package with.
        public let domainName: String?
        /// State of the association. Values are ASSOCIATING/ASSOCIATION_FAILED/ACTIVE/DISSOCIATING/DISSOCIATION_FAILED.
        public let domainPackageStatus: DomainPackageStatus?
        /// Additional information if the package is in an error state. Null otherwise.
        public let errorDetails: ErrorDetails?
        /// Timestamp of the most-recent update to the association status.
        public let lastUpdated: Date?
        /// Internal ID of the package.
        public let packageID: String?
        /// User specified name of the package.
        public let packageName: String?
        /// Currently supports only TXT-DICTIONARY.
        public let packageType: PackageType?
        public let packageVersion: String?
        /// The relative path on Amazon ES nodes, which can be used as synonym_path when the package is synonym file.
        public let referencePath: String?

        public init(domainName: String? = nil, domainPackageStatus: DomainPackageStatus? = nil, errorDetails: ErrorDetails? = nil, lastUpdated: Date? = nil, packageID: String? = nil, packageName: String? = nil, packageType: PackageType? = nil, packageVersion: String? = nil, referencePath: String? = nil) {
            self.domainName = domainName
            self.domainPackageStatus = domainPackageStatus
            self.errorDetails = errorDetails
            self.lastUpdated = lastUpdated
            self.packageID = packageID
            self.packageName = packageName
            self.packageType = packageType
            self.packageVersion = packageVersion
            self.referencePath = referencePath
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
            case domainPackageStatus = "DomainPackageStatus"
            case errorDetails = "ErrorDetails"
            case lastUpdated = "LastUpdated"
            case packageID = "PackageID"
            case packageName = "PackageName"
            case packageType = "PackageType"
            case packageVersion = "PackageVersion"
            case referencePath = "ReferencePath"
        }
    }

    public struct Duration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the unit of a maintenance schedule duration. Valid value is HOURS. See the Developer Guide for more information.
        public let unit: TimeUnit?
        ///  Integer to specify the value of a maintenance schedule duration. See the Developer Guide for more information.
        public let value: Int64?

        public init(unit: TimeUnit? = nil, value: Int64? = nil) {
            self.unit = unit
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 24)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case unit = "Unit"
            case value = "Value"
        }
    }

    public struct EBSOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether EBS-based storage is enabled.
        public let eBSEnabled: Bool?
        /// Specifies the IOPD for a Provisioned IOPS EBS volume (SSD).
        public let iops: Int?
        ///  Integer to specify the size of an EBS volume.
        public let volumeSize: Int?
        ///  Specifies the volume type for EBS-based storage.
        public let volumeType: VolumeType?

        public init(eBSEnabled: Bool? = nil, iops: Int? = nil, volumeSize: Int? = nil, volumeType: VolumeType? = nil) {
            self.eBSEnabled = eBSEnabled
            self.iops = iops
            self.volumeSize = volumeSize
            self.volumeType = volumeType
        }

        private enum CodingKeys: String, CodingKey {
            case eBSEnabled = "EBSEnabled"
            case iops = "Iops"
            case volumeSize = "VolumeSize"
            case volumeType = "VolumeType"
        }
    }

    public struct EBSOptionsStatus: AWSDecodableShape {
        ///  Specifies the EBS options for the specified Elasticsearch domain.
        public let options: EBSOptions
        ///  Specifies the status of the EBS options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: EBSOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct ElasticsearchClusterConfig: AWSEncodableShape & AWSDecodableShape {
        /// Total number of dedicated master nodes, active and on standby, for the cluster.
        public let dedicatedMasterCount: Int?
        /// A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information.
        public let dedicatedMasterEnabled: Bool?
        /// The instance type for a dedicated master node.
        public let dedicatedMasterType: ESPartitionInstanceType?
        /// The number of instances in the specified domain cluster.
        public let instanceCount: Int?
        /// The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances.
        public let instanceType: ESPartitionInstanceType?
        /// The number of warm nodes in the cluster.
        public let warmCount: Int?
        /// True to enable warm storage.
        public let warmEnabled: Bool?
        /// The instance type for the Elasticsearch cluster's warm nodes.
        public let warmType: ESWarmPartitionInstanceType?
        /// Specifies the zone awareness configuration for a domain when zone awareness is enabled.
        public let zoneAwarenessConfig: ZoneAwarenessConfig?
        /// A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information.
        public let zoneAwarenessEnabled: Bool?

        public init(dedicatedMasterCount: Int? = nil, dedicatedMasterEnabled: Bool? = nil, dedicatedMasterType: ESPartitionInstanceType? = nil, instanceCount: Int? = nil, instanceType: ESPartitionInstanceType? = nil, warmCount: Int? = nil, warmEnabled: Bool? = nil, warmType: ESWarmPartitionInstanceType? = nil, zoneAwarenessConfig: ZoneAwarenessConfig? = nil, zoneAwarenessEnabled: Bool? = nil) {
            self.dedicatedMasterCount = dedicatedMasterCount
            self.dedicatedMasterEnabled = dedicatedMasterEnabled
            self.dedicatedMasterType = dedicatedMasterType
            self.instanceCount = instanceCount
            self.instanceType = instanceType
            self.warmCount = warmCount
            self.warmEnabled = warmEnabled
            self.warmType = warmType
            self.zoneAwarenessConfig = zoneAwarenessConfig
            self.zoneAwarenessEnabled = zoneAwarenessEnabled
        }

        private enum CodingKeys: String, CodingKey {
            case dedicatedMasterCount = "DedicatedMasterCount"
            case dedicatedMasterEnabled = "DedicatedMasterEnabled"
            case dedicatedMasterType = "DedicatedMasterType"
            case instanceCount = "InstanceCount"
            case instanceType = "InstanceType"
            case warmCount = "WarmCount"
            case warmEnabled = "WarmEnabled"
            case warmType = "WarmType"
            case zoneAwarenessConfig = "ZoneAwarenessConfig"
            case zoneAwarenessEnabled = "ZoneAwarenessEnabled"
        }
    }

    public struct ElasticsearchClusterConfigStatus: AWSDecodableShape {
        ///  Specifies the cluster configuration for the specified Elasticsearch domain.
        public let options: ElasticsearchClusterConfig
        ///  Specifies the status of the configuration for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: ElasticsearchClusterConfig, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct ElasticsearchDomainConfig: AWSDecodableShape {
        /// IAM access policy as a JSON-formatted string.
        public let accessPolicies: AccessPoliciesStatus?
        /// Specifies the AdvancedOptions for the domain. See Configuring Advanced Options for more information.
        public let advancedOptions: AdvancedOptionsStatus?
        /// Specifies AdvancedSecurityOptions for the domain.
        public let advancedSecurityOptions: AdvancedSecurityOptionsStatus?
        /// Specifies AutoTuneOptions for the domain.
        public let autoTuneOptions: AutoTuneOptionsStatus?
        /// The CognitoOptions for the specified domain. For more information, see Amazon Cognito Authentication for Kibana.
        public let cognitoOptions: CognitoOptionsStatus?
        /// Specifies the DomainEndpointOptions for the Elasticsearch domain.
        public let domainEndpointOptions: DomainEndpointOptionsStatus?
        /// Specifies the EBSOptions for the Elasticsearch domain.
        public let eBSOptions: EBSOptionsStatus?
        /// Specifies the ElasticsearchClusterConfig for the Elasticsearch domain.
        public let elasticsearchClusterConfig: ElasticsearchClusterConfigStatus?
        /// String of format X.Y to specify version for the Elasticsearch domain.
        public let elasticsearchVersion: ElasticsearchVersionStatus?
        /// Specifies the EncryptionAtRestOptions for the Elasticsearch domain.
        public let encryptionAtRestOptions: EncryptionAtRestOptionsStatus?
        /// Log publishing options for the given domain.
        public let logPublishingOptions: LogPublishingOptionsStatus?
        /// Specifies the NodeToNodeEncryptionOptions for the Elasticsearch domain.
        public let nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptionsStatus?
        /// Specifies the SnapshotOptions for the Elasticsearch domain.
        public let snapshotOptions: SnapshotOptionsStatus?
        /// The VPCOptions for the specified domain. For more information, see VPC Endpoints for Amazon Elasticsearch Service Domains.
        public let vPCOptions: VPCDerivedInfoStatus?

        public init(accessPolicies: AccessPoliciesStatus? = nil, advancedOptions: AdvancedOptionsStatus? = nil, advancedSecurityOptions: AdvancedSecurityOptionsStatus? = nil, autoTuneOptions: AutoTuneOptionsStatus? = nil, cognitoOptions: CognitoOptionsStatus? = nil, domainEndpointOptions: DomainEndpointOptionsStatus? = nil, eBSOptions: EBSOptionsStatus? = nil, elasticsearchClusterConfig: ElasticsearchClusterConfigStatus? = nil, elasticsearchVersion: ElasticsearchVersionStatus? = nil, encryptionAtRestOptions: EncryptionAtRestOptionsStatus? = nil, logPublishingOptions: LogPublishingOptionsStatus? = nil, nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptionsStatus? = nil, snapshotOptions: SnapshotOptionsStatus? = nil, vPCOptions: VPCDerivedInfoStatus? = nil) {
            self.accessPolicies = accessPolicies
            self.advancedOptions = advancedOptions
            self.advancedSecurityOptions = advancedSecurityOptions
            self.autoTuneOptions = autoTuneOptions
            self.cognitoOptions = cognitoOptions
            self.domainEndpointOptions = domainEndpointOptions
            self.eBSOptions = eBSOptions
            self.elasticsearchClusterConfig = elasticsearchClusterConfig
            self.elasticsearchVersion = elasticsearchVersion
            self.encryptionAtRestOptions = encryptionAtRestOptions
            self.logPublishingOptions = logPublishingOptions
            self.nodeToNodeEncryptionOptions = nodeToNodeEncryptionOptions
            self.snapshotOptions = snapshotOptions
            self.vPCOptions = vPCOptions
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicies = "AccessPolicies"
            case advancedOptions = "AdvancedOptions"
            case advancedSecurityOptions = "AdvancedSecurityOptions"
            case autoTuneOptions = "AutoTuneOptions"
            case cognitoOptions = "CognitoOptions"
            case domainEndpointOptions = "DomainEndpointOptions"
            case eBSOptions = "EBSOptions"
            case elasticsearchClusterConfig = "ElasticsearchClusterConfig"
            case elasticsearchVersion = "ElasticsearchVersion"
            case encryptionAtRestOptions = "EncryptionAtRestOptions"
            case logPublishingOptions = "LogPublishingOptions"
            case nodeToNodeEncryptionOptions = "NodeToNodeEncryptionOptions"
            case snapshotOptions = "SnapshotOptions"
            case vPCOptions = "VPCOptions"
        }
    }

    public struct ElasticsearchDomainStatus: AWSDecodableShape {
        ///  IAM access policy as a JSON-formatted string.
        public let accessPolicies: String?
        /// Specifies the status of the AdvancedOptions
        public let advancedOptions: [String: String]?
        /// The current status of the Elasticsearch domain's advanced security options.
        public let advancedSecurityOptions: AdvancedSecurityOptions?
        /// The Amazon resource name (ARN) of an Elasticsearch domain. See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
        public let arn: String
        /// The current status of the Elasticsearch domain's Auto-Tune options.
        public let autoTuneOptions: AutoTuneOptionsOutput?
        /// The CognitoOptions for the specified domain. For more information, see Amazon Cognito Authentication for Kibana.
        public let cognitoOptions: CognitoOptions?
        /// The domain creation status. True if the creation of an Elasticsearch domain is complete. False if domain creation is still in progress.
        public let created: Bool?
        /// The domain deletion status. True if a delete request has been received for the domain but resource cleanup is still in progress. False if the domain has not been deleted. Once domain deletion is complete, the status of the domain is no longer returned.
        public let deleted: Bool?
        /// The current status of the Elasticsearch domain's endpoint options.
        public let domainEndpointOptions: DomainEndpointOptions?
        /// The unique identifier for the specified Elasticsearch domain.
        public let domainId: String
        /// The name of an Elasticsearch domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).
        public let domainName: String
        /// The EBSOptions for the specified domain. See Configuring EBS-based Storage for more information.
        public let eBSOptions: EBSOptions?
        /// The type and number of instances in the domain cluster.
        public let elasticsearchClusterConfig: ElasticsearchClusterConfig
        public let elasticsearchVersion: String?
        ///  Specifies the status of the EncryptionAtRestOptions.
        public let encryptionAtRestOptions: EncryptionAtRestOptions?
        /// The Elasticsearch domain endpoint that you use to submit index and search requests.
        public let endpoint: String?
        /// Map containing the Elasticsearch domain endpoints used to submit index and search requests. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'.
        public let endpoints: [String: String]?
        /// Log publishing options for the given domain.
        public let logPublishingOptions: [LogType: LogPublishingOption]?
        /// Specifies the status of the NodeToNodeEncryptionOptions.
        public let nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptions?
        /// The status of the Elasticsearch domain configuration. True if Amazon Elasticsearch Service is processing configuration changes. False if the configuration is active.
        public let processing: Bool?
        /// The current status of the Elasticsearch domain's service software.
        public let serviceSoftwareOptions: ServiceSoftwareOptions?
        /// Specifies the status of the SnapshotOptions
        public let snapshotOptions: SnapshotOptions?
        /// The status of an Elasticsearch domain version upgrade. True if Amazon Elasticsearch Service is undergoing a version upgrade. False if the configuration is active.
        public let upgradeProcessing: Bool?
        /// The VPCOptions for the specified domain. For more information, see VPC Endpoints for Amazon Elasticsearch Service Domains.
        public let vPCOptions: VPCDerivedInfo?

        public init(accessPolicies: String? = nil, advancedOptions: [String: String]? = nil, advancedSecurityOptions: AdvancedSecurityOptions? = nil, arn: String, autoTuneOptions: AutoTuneOptionsOutput? = nil, cognitoOptions: CognitoOptions? = nil, created: Bool? = nil, deleted: Bool? = nil, domainEndpointOptions: DomainEndpointOptions? = nil, domainId: String, domainName: String, eBSOptions: EBSOptions? = nil, elasticsearchClusterConfig: ElasticsearchClusterConfig, elasticsearchVersion: String? = nil, encryptionAtRestOptions: EncryptionAtRestOptions? = nil, endpoint: String? = nil, endpoints: [String: String]? = nil, logPublishingOptions: [LogType: LogPublishingOption]? = nil, nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptions? = nil, processing: Bool? = nil, serviceSoftwareOptions: ServiceSoftwareOptions? = nil, snapshotOptions: SnapshotOptions? = nil, upgradeProcessing: Bool? = nil, vPCOptions: VPCDerivedInfo? = nil) {
            self.accessPolicies = accessPolicies
            self.advancedOptions = advancedOptions
            self.advancedSecurityOptions = advancedSecurityOptions
            self.arn = arn
            self.autoTuneOptions = autoTuneOptions
            self.cognitoOptions = cognitoOptions
            self.created = created
            self.deleted = deleted
            self.domainEndpointOptions = domainEndpointOptions
            self.domainId = domainId
            self.domainName = domainName
            self.eBSOptions = eBSOptions
            self.elasticsearchClusterConfig = elasticsearchClusterConfig
            self.elasticsearchVersion = elasticsearchVersion
            self.encryptionAtRestOptions = encryptionAtRestOptions
            self.endpoint = endpoint
            self.endpoints = endpoints
            self.logPublishingOptions = logPublishingOptions
            self.nodeToNodeEncryptionOptions = nodeToNodeEncryptionOptions
            self.processing = processing
            self.serviceSoftwareOptions = serviceSoftwareOptions
            self.snapshotOptions = snapshotOptions
            self.upgradeProcessing = upgradeProcessing
            self.vPCOptions = vPCOptions
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicies = "AccessPolicies"
            case advancedOptions = "AdvancedOptions"
            case advancedSecurityOptions = "AdvancedSecurityOptions"
            case arn = "ARN"
            case autoTuneOptions = "AutoTuneOptions"
            case cognitoOptions = "CognitoOptions"
            case created = "Created"
            case deleted = "Deleted"
            case domainEndpointOptions = "DomainEndpointOptions"
            case domainId = "DomainId"
            case domainName = "DomainName"
            case eBSOptions = "EBSOptions"
            case elasticsearchClusterConfig = "ElasticsearchClusterConfig"
            case elasticsearchVersion = "ElasticsearchVersion"
            case encryptionAtRestOptions = "EncryptionAtRestOptions"
            case endpoint = "Endpoint"
            case endpoints = "Endpoints"
            case logPublishingOptions = "LogPublishingOptions"
            case nodeToNodeEncryptionOptions = "NodeToNodeEncryptionOptions"
            case processing = "Processing"
            case serviceSoftwareOptions = "ServiceSoftwareOptions"
            case snapshotOptions = "SnapshotOptions"
            case upgradeProcessing = "UpgradeProcessing"
            case vPCOptions = "VPCOptions"
        }
    }

    public struct ElasticsearchVersionStatus: AWSDecodableShape {
        ///  Specifies the Elasticsearch version for the specified Elasticsearch domain.
        public let options: String
        ///  Specifies the status of the Elasticsearch version options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: String, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct EncryptionAtRestOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the option to enable Encryption At Rest.
        public let enabled: Bool?
        ///  Specifies the KMS Key ID for Encryption At Rest options.
        public let kmsKeyId: String?

        public init(enabled: Bool? = nil, kmsKeyId: String? = nil) {
            self.enabled = enabled
            self.kmsKeyId = kmsKeyId
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 500)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case kmsKeyId = "KmsKeyId"
        }
    }

    public struct EncryptionAtRestOptionsStatus: AWSDecodableShape {
        ///  Specifies the Encryption At Rest options for the specified Elasticsearch domain.
        public let options: EncryptionAtRestOptions
        ///  Specifies the status of the Encryption At Rest options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: EncryptionAtRestOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct ErrorDetails: AWSDecodableShape {
        public let errorMessage: String?
        public let errorType: String?

        public init(errorMessage: String? = nil, errorType: String? = nil) {
            self.errorMessage = errorMessage
            self.errorType = errorType
        }

        private enum CodingKeys: String, CodingKey {
            case errorMessage = "ErrorMessage"
            case errorType = "ErrorType"
        }
    }

    public struct Filter: AWSEncodableShape {
        ///  Specifies the name of the filter.
        public let name: String?
        ///  Contains one or more values for the filter.
        public let values: [String]?

        public init(name: String? = nil, values: [String]? = nil) {
            self.name = name
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.values?.forEach {
                try validate($0, name: "values[]", parent: name, min: 1)
            }
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case values = "Values"
        }
    }

    public struct GetCompatibleElasticsearchVersionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .querystring(locationName: "domainName"))
        ]

        public let domainName: String?

        public init(domainName: String? = nil) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetCompatibleElasticsearchVersionsResponse: AWSDecodableShape {
        ///  A map of compatible Elasticsearch versions returned as part of the  GetCompatibleElasticsearchVersions  operation.
        public let compatibleElasticsearchVersions: [CompatibleVersionsMap]?

        public init(compatibleElasticsearchVersions: [CompatibleVersionsMap]? = nil) {
            self.compatibleElasticsearchVersions = compatibleElasticsearchVersions
        }

        private enum CodingKeys: String, CodingKey {
            case compatibleElasticsearchVersions = "CompatibleElasticsearchVersions"
        }
    }

    public struct GetPackageVersionHistoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "packageID", location: .uri(locationName: "PackageID"))
        ]

        /// Limits results to a maximum number of versions.
        public let maxResults: Int?
        /// Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.
        public let nextToken: String?
        /// Returns an audit history of versions of the package.
        public let packageID: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, packageID: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.packageID = packageID
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPackageVersionHistoryResponse: AWSDecodableShape {
        public let nextToken: String?
        public let packageID: String?
        /// List of PackageVersionHistory objects.
        public let packageVersionHistoryList: [PackageVersionHistory]?

        public init(nextToken: String? = nil, packageID: String? = nil, packageVersionHistoryList: [PackageVersionHistory]? = nil) {
            self.nextToken = nextToken
            self.packageID = packageID
            self.packageVersionHistoryList = packageVersionHistoryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case packageID = "PackageID"
            case packageVersionHistoryList = "PackageVersionHistoryList"
        }
    }

    public struct GetUpgradeHistoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        public let domainName: String
        public let maxResults: Int?
        public let nextToken: String?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetUpgradeHistoryResponse: AWSDecodableShape {
        /// Pagination token that needs to be supplied to the next call to get the next page of results
        public let nextToken: String?
        ///  A list of  UpgradeHistory  objects corresponding to each Upgrade or Upgrade Eligibility Check performed on a domain returned as part of  GetUpgradeHistoryResponse  object.
        public let upgradeHistories: [UpgradeHistory]?

        public init(nextToken: String? = nil, upgradeHistories: [UpgradeHistory]? = nil) {
            self.nextToken = nextToken
            self.upgradeHistories = upgradeHistories
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case upgradeHistories = "UpgradeHistories"
        }
    }

    public struct GetUpgradeStatusRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName"))
        ]

        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetUpgradeStatusResponse: AWSDecodableShape {
        ///  One of 4 statuses that a step can go through returned as part of the  GetUpgradeStatusResponse  object. The status can take one of the following values:  In Progress Succeeded Succeeded with Issues Failed
        public let stepStatus: UpgradeStatus?
        /// A string that describes the update briefly
        public let upgradeName: String?
        ///  Represents one of 3 steps that an Upgrade or Upgrade Eligibility Check does through:  PreUpgradeCheck Snapshot Upgrade
        public let upgradeStep: UpgradeStep?

        public init(stepStatus: UpgradeStatus? = nil, upgradeName: String? = nil, upgradeStep: UpgradeStep? = nil) {
            self.stepStatus = stepStatus
            self.upgradeName = upgradeName
            self.upgradeStep = upgradeStep
        }

        private enum CodingKeys: String, CodingKey {
            case stepStatus = "StepStatus"
            case upgradeName = "UpgradeName"
            case upgradeStep = "UpgradeStep"
        }
    }

    public struct InboundCrossClusterSearchConnection: AWSDecodableShape {
        /// Specifies the InboundCrossClusterSearchConnectionStatus for the outbound connection.
        public let connectionStatus: InboundCrossClusterSearchConnectionStatus?
        /// Specifies the connection id for the inbound cross-cluster search connection.
        public let crossClusterSearchConnectionId: String?
        /// Specifies the DomainInformation for the destination Elasticsearch domain.
        public let destinationDomainInfo: DomainInformation?
        /// Specifies the DomainInformation for the source Elasticsearch domain.
        public let sourceDomainInfo: DomainInformation?

        public init(connectionStatus: InboundCrossClusterSearchConnectionStatus? = nil, crossClusterSearchConnectionId: String? = nil, destinationDomainInfo: DomainInformation? = nil, sourceDomainInfo: DomainInformation? = nil) {
            self.connectionStatus = connectionStatus
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
            self.destinationDomainInfo = destinationDomainInfo
            self.sourceDomainInfo = sourceDomainInfo
        }

        private enum CodingKeys: String, CodingKey {
            case connectionStatus = "ConnectionStatus"
            case crossClusterSearchConnectionId = "CrossClusterSearchConnectionId"
            case destinationDomainInfo = "DestinationDomainInfo"
            case sourceDomainInfo = "SourceDomainInfo"
        }
    }

    public struct InboundCrossClusterSearchConnectionStatus: AWSDecodableShape {
        /// Specifies verbose information for the inbound connection status.
        public let message: String?
        /// The state code for inbound connection. This can be one of the following:  PENDING_ACCEPTANCE: Inbound connection is not yet accepted by destination domain owner. APPROVED: Inbound connection is pending acceptance by destination domain owner. REJECTING: Inbound connection rejection is in process. REJECTED: Inbound connection is rejected. DELETING: Inbound connection deletion is in progress. DELETED: Inbound connection is deleted and cannot be used further.
        public let statusCode: InboundCrossClusterSearchConnectionStatusCode?

        public init(message: String? = nil, statusCode: InboundCrossClusterSearchConnectionStatusCode? = nil) {
            self.message = message
            self.statusCode = statusCode
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case statusCode = "StatusCode"
        }
    }

    public struct InstanceCountLimits: AWSDecodableShape {
        public let maximumInstanceCount: Int?
        public let minimumInstanceCount: Int?

        public init(maximumInstanceCount: Int? = nil, minimumInstanceCount: Int? = nil) {
            self.maximumInstanceCount = maximumInstanceCount
            self.minimumInstanceCount = minimumInstanceCount
        }

        private enum CodingKeys: String, CodingKey {
            case maximumInstanceCount = "MaximumInstanceCount"
            case minimumInstanceCount = "MinimumInstanceCount"
        }
    }

    public struct InstanceLimits: AWSDecodableShape {
        public let instanceCountLimits: InstanceCountLimits?

        public init(instanceCountLimits: InstanceCountLimits? = nil) {
            self.instanceCountLimits = instanceCountLimits
        }

        private enum CodingKeys: String, CodingKey {
            case instanceCountLimits = "InstanceCountLimits"
        }
    }

    public struct Limits: AWSDecodableShape {
        ///  List of additional limits that are specific to a given InstanceType and for each of it's  InstanceRole  .
        public let additionalLimits: [AdditionalLimit]?
        public let instanceLimits: InstanceLimits?
        /// StorageType represents the list of storage related types and attributes that are available for given InstanceType.
        public let storageTypes: [StorageType]?

        public init(additionalLimits: [AdditionalLimit]? = nil, instanceLimits: InstanceLimits? = nil, storageTypes: [StorageType]? = nil) {
            self.additionalLimits = additionalLimits
            self.instanceLimits = instanceLimits
            self.storageTypes = storageTypes
        }

        private enum CodingKeys: String, CodingKey {
            case additionalLimits = "AdditionalLimits"
            case instanceLimits = "InstanceLimits"
            case storageTypes = "StorageTypes"
        }
    }

    public struct ListDomainNamesResponse: AWSDecodableShape {
        /// List of Elasticsearch domain names.
        public let domainNames: [DomainInfo]?

        public init(domainNames: [DomainInfo]? = nil) {
            self.domainNames = domainNames
        }

        private enum CodingKeys: String, CodingKey {
            case domainNames = "DomainNames"
        }
    }

    public struct ListDomainsForPackageRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "packageID", location: .uri(locationName: "PackageID"))
        ]

        /// Limits results to a maximum number of domains.
        public let maxResults: Int?
        /// Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.
        public let nextToken: String?
        /// The package for which to list domains.
        public let packageID: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, packageID: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.packageID = packageID
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDomainsForPackageResponse: AWSDecodableShape {
        /// List of DomainPackageDetails objects.
        public let domainPackageDetailsList: [DomainPackageDetails]?
        public let nextToken: String?

        public init(domainPackageDetailsList: [DomainPackageDetails]? = nil, nextToken: String? = nil) {
            self.domainPackageDetailsList = domainPackageDetailsList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case domainPackageDetailsList = "DomainPackageDetailsList"
            case nextToken = "NextToken"
        }
    }

    public struct ListElasticsearchInstanceTypesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .querystring(locationName: "domainName")),
            AWSMemberEncoding(label: "elasticsearchVersion", location: .uri(locationName: "ElasticsearchVersion")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// DomainName represents the name of the Domain that we are trying to modify. This should be present only if we are querying for list of available Elasticsearch instance types when modifying existing domain.
        public let domainName: String?
        /// Version of Elasticsearch for which list of supported elasticsearch instance types are needed.
        public let elasticsearchVersion: String
        ///  Set this value to limit the number of results returned. Value provided must be greater than 30 else it wont be honored.
        public let maxResults: Int?
        /// NextToken should be sent in case if earlier API call produced result containing NextToken. It is used for pagination.
        public let nextToken: String?

        public init(domainName: String? = nil, elasticsearchVersion: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.elasticsearchVersion = elasticsearchVersion
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListElasticsearchInstanceTypesResponse: AWSDecodableShape {
        ///  List of instance types supported by Amazon Elasticsearch service for given  ElasticsearchVersion
        public let elasticsearchInstanceTypes: [ESPartitionInstanceType]?
        /// In case if there are more results available NextToken would be present, make further request to the same API with received NextToken to paginate remaining results.
        public let nextToken: String?

        public init(elasticsearchInstanceTypes: [ESPartitionInstanceType]? = nil, nextToken: String? = nil) {
            self.elasticsearchInstanceTypes = elasticsearchInstanceTypes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case elasticsearchInstanceTypes = "ElasticsearchInstanceTypes"
            case nextToken = "NextToken"
        }
    }

    public struct ListElasticsearchVersionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        ///  Set this value to limit the number of results returned. Value provided must be greater than 10 else it wont be honored.
        public let maxResults: Int?
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListElasticsearchVersionsResponse: AWSDecodableShape {
        public let elasticsearchVersions: [String]?
        public let nextToken: String?

        public init(elasticsearchVersions: [String]? = nil, nextToken: String? = nil) {
            self.elasticsearchVersions = elasticsearchVersions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case elasticsearchVersions = "ElasticsearchVersions"
            case nextToken = "NextToken"
        }
    }

    public struct ListPackagesForDomainRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The name of the domain for which you want to list associated packages.
        public let domainName: String
        /// Limits results to a maximum number of packages.
        public let maxResults: Int?
        /// Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.
        public let nextToken: String?

        public init(domainName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.domainName = domainName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPackagesForDomainResponse: AWSDecodableShape {
        /// List of DomainPackageDetails objects.
        public let domainPackageDetailsList: [DomainPackageDetails]?
        /// Pagination token that needs to be supplied to the next call to get the next page of results.
        public let nextToken: String?

        public init(domainPackageDetailsList: [DomainPackageDetails]? = nil, nextToken: String? = nil) {
            self.domainPackageDetailsList = domainPackageDetailsList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case domainPackageDetailsList = "DomainPackageDetailsList"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "arn", location: .querystring(locationName: "arn"))
        ]

        ///  Specify the ARN for the Elasticsearch domain to which the tags are attached that you want to view.
        public let arn: String

        public init(arn: String) {
            self.arn = arn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsResponse: AWSDecodableShape {
        ///  List of Tag for the requested Elasticsearch domain.
        public let tagList: [Tag]?

        public init(tagList: [Tag]? = nil) {
            self.tagList = tagList
        }

        private enum CodingKeys: String, CodingKey {
            case tagList = "TagList"
        }
    }

    public struct LogPublishingOption: AWSEncodableShape & AWSDecodableShape {
        public let cloudWatchLogsLogGroupArn: String?
        ///  Specifies whether given log publishing option is enabled or not.
        public let enabled: Bool?

        public init(cloudWatchLogsLogGroupArn: String? = nil, enabled: Bool? = nil) {
            self.cloudWatchLogsLogGroupArn = cloudWatchLogsLogGroupArn
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsLogGroupArn = "CloudWatchLogsLogGroupArn"
            case enabled = "Enabled"
        }
    }

    public struct LogPublishingOptionsStatus: AWSDecodableShape {
        /// The log publishing options configured for the Elasticsearch domain.
        public let options: [LogType: LogPublishingOption]?
        /// The status of the log publishing options for the Elasticsearch domain. See OptionStatus for the status information that's included.
        public let status: OptionStatus?

        public init(options: [LogType: LogPublishingOption]? = nil, status: OptionStatus? = nil) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct MasterUserOptions: AWSEncodableShape {
        /// ARN for the master user (if IAM is enabled).
        public let masterUserARN: String?
        /// The master user's username, which is stored in the Amazon Elasticsearch Service domain's internal database.
        public let masterUserName: String?
        /// The master user's password, which is stored in the Amazon Elasticsearch Service domain's internal database.
        public let masterUserPassword: String?

        public init(masterUserARN: String? = nil, masterUserName: String? = nil, masterUserPassword: String? = nil) {
            self.masterUserARN = masterUserARN
            self.masterUserName = masterUserName
            self.masterUserPassword = masterUserPassword
        }

        public func validate(name: String) throws {
            try self.validate(self.masterUserName, name: "masterUserName", parent: name, min: 1)
            try self.validate(self.masterUserPassword, name: "masterUserPassword", parent: name, min: 8)
        }

        private enum CodingKeys: String, CodingKey {
            case masterUserARN = "MasterUserARN"
            case masterUserName = "MasterUserName"
            case masterUserPassword = "MasterUserPassword"
        }
    }

    public struct NodeToNodeEncryptionOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specify true to enable node-to-node encryption.
        public let enabled: Bool?

        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
        }
    }

    public struct NodeToNodeEncryptionOptionsStatus: AWSDecodableShape {
        /// Specifies the node-to-node encryption options for the specified Elasticsearch domain.
        public let options: NodeToNodeEncryptionOptions
        /// Specifies the status of the node-to-node encryption options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: NodeToNodeEncryptionOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct OptionStatus: AWSDecodableShape {
        /// Timestamp which tells the creation date for the entity.
        public let creationDate: Date
        /// Indicates whether the Elasticsearch domain is being deleted.
        public let pendingDeletion: Bool?
        /// Provides the OptionState for the Elasticsearch domain.
        public let state: OptionState
        /// Timestamp which tells the last updated time for the entity.
        public let updateDate: Date
        /// Specifies the latest version for the entity.
        public let updateVersion: Int?

        public init(creationDate: Date, pendingDeletion: Bool? = nil, state: OptionState, updateDate: Date, updateVersion: Int? = nil) {
            self.creationDate = creationDate
            self.pendingDeletion = pendingDeletion
            self.state = state
            self.updateDate = updateDate
            self.updateVersion = updateVersion
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case pendingDeletion = "PendingDeletion"
            case state = "State"
            case updateDate = "UpdateDate"
            case updateVersion = "UpdateVersion"
        }
    }

    public struct OutboundCrossClusterSearchConnection: AWSDecodableShape {
        /// Specifies the connection alias for the outbound cross-cluster search connection.
        public let connectionAlias: String?
        /// Specifies the OutboundCrossClusterSearchConnectionStatus for the outbound connection.
        public let connectionStatus: OutboundCrossClusterSearchConnectionStatus?
        /// Specifies the connection id for the outbound cross-cluster search connection.
        public let crossClusterSearchConnectionId: String?
        /// Specifies the DomainInformation for the destination Elasticsearch domain.
        public let destinationDomainInfo: DomainInformation?
        /// Specifies the DomainInformation for the source Elasticsearch domain.
        public let sourceDomainInfo: DomainInformation?

        public init(connectionAlias: String? = nil, connectionStatus: OutboundCrossClusterSearchConnectionStatus? = nil, crossClusterSearchConnectionId: String? = nil, destinationDomainInfo: DomainInformation? = nil, sourceDomainInfo: DomainInformation? = nil) {
            self.connectionAlias = connectionAlias
            self.connectionStatus = connectionStatus
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
            self.destinationDomainInfo = destinationDomainInfo
            self.sourceDomainInfo = sourceDomainInfo
        }

        private enum CodingKeys: String, CodingKey {
            case connectionAlias = "ConnectionAlias"
            case connectionStatus = "ConnectionStatus"
            case crossClusterSearchConnectionId = "CrossClusterSearchConnectionId"
            case destinationDomainInfo = "DestinationDomainInfo"
            case sourceDomainInfo = "SourceDomainInfo"
        }
    }

    public struct OutboundCrossClusterSearchConnectionStatus: AWSDecodableShape {
        /// Specifies verbose information for the outbound connection status.
        public let message: String?
        /// The state code for outbound connection. This can be one of the following:  VALIDATING: The outbound connection request is being validated. VALIDATION_FAILED: Validation failed for the connection request. PENDING_ACCEPTANCE: Outbound connection request is validated and is not yet accepted by destination domain owner. PROVISIONING: Outbound connection request is in process. ACTIVE: Outbound connection is active and ready to use. REJECTED: Outbound connection request is rejected by destination domain owner. DELETING: Outbound connection deletion is in progress. DELETED: Outbound connection is deleted and cannot be used further.
        public let statusCode: OutboundCrossClusterSearchConnectionStatusCode?

        public init(message: String? = nil, statusCode: OutboundCrossClusterSearchConnectionStatusCode? = nil) {
            self.message = message
            self.statusCode = statusCode
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case statusCode = "StatusCode"
        }
    }

    public struct PackageDetails: AWSDecodableShape {
        public let availablePackageVersion: String?
        /// Timestamp which tells creation date of the package.
        public let createdAt: Date?
        /// Additional information if the package is in an error state. Null otherwise.
        public let errorDetails: ErrorDetails?
        public let lastUpdatedAt: Date?
        /// User-specified description of the package.
        public let packageDescription: String?
        /// Internal ID of the package.
        public let packageID: String?
        /// User specified name of the package.
        public let packageName: String?
        /// Current state of the package. Values are COPYING/COPY_FAILED/AVAILABLE/DELETING/DELETE_FAILED
        public let packageStatus: PackageStatus?
        /// Currently supports only TXT-DICTIONARY.
        public let packageType: PackageType?

        public init(availablePackageVersion: String? = nil, createdAt: Date? = nil, errorDetails: ErrorDetails? = nil, lastUpdatedAt: Date? = nil, packageDescription: String? = nil, packageID: String? = nil, packageName: String? = nil, packageStatus: PackageStatus? = nil, packageType: PackageType? = nil) {
            self.availablePackageVersion = availablePackageVersion
            self.createdAt = createdAt
            self.errorDetails = errorDetails
            self.lastUpdatedAt = lastUpdatedAt
            self.packageDescription = packageDescription
            self.packageID = packageID
            self.packageName = packageName
            self.packageStatus = packageStatus
            self.packageType = packageType
        }

        private enum CodingKeys: String, CodingKey {
            case availablePackageVersion = "AvailablePackageVersion"
            case createdAt = "CreatedAt"
            case errorDetails = "ErrorDetails"
            case lastUpdatedAt = "LastUpdatedAt"
            case packageDescription = "PackageDescription"
            case packageID = "PackageID"
            case packageName = "PackageName"
            case packageStatus = "PackageStatus"
            case packageType = "PackageType"
        }
    }

    public struct PackageSource: AWSEncodableShape {
        /// Name of the bucket containing the package.
        public let s3BucketName: String?
        /// Key (file name) of the package.
        public let s3Key: String?

        public init(s3BucketName: String? = nil, s3Key: String? = nil) {
            self.s3BucketName = s3BucketName
            self.s3Key = s3Key
        }

        public func validate(name: String) throws {
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, max: 63)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, min: 3)
        }

        private enum CodingKeys: String, CodingKey {
            case s3BucketName = "S3BucketName"
            case s3Key = "S3Key"
        }
    }

    public struct PackageVersionHistory: AWSDecodableShape {
        /// A message associated with the version.
        public let commitMessage: String?
        /// Timestamp which tells creation time of the package version.
        public let createdAt: Date?
        /// Version of the package.
        public let packageVersion: String?

        public init(commitMessage: String? = nil, createdAt: Date? = nil, packageVersion: String? = nil) {
            self.commitMessage = commitMessage
            self.createdAt = createdAt
            self.packageVersion = packageVersion
        }

        private enum CodingKeys: String, CodingKey {
            case commitMessage = "CommitMessage"
            case createdAt = "CreatedAt"
            case packageVersion = "PackageVersion"
        }
    }

    public struct PurchaseReservedElasticsearchInstanceOfferingRequest: AWSEncodableShape {
        /// The number of Elasticsearch instances to reserve.
        public let instanceCount: Int?
        /// A customer-specified identifier to track this reservation.
        public let reservationName: String
        /// The ID of the reserved Elasticsearch instance offering to purchase.
        public let reservedElasticsearchInstanceOfferingId: String

        public init(instanceCount: Int? = nil, reservationName: String, reservedElasticsearchInstanceOfferingId: String) {
            self.instanceCount = instanceCount
            self.reservationName = reservationName
            self.reservedElasticsearchInstanceOfferingId = reservedElasticsearchInstanceOfferingId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceCount, name: "instanceCount", parent: name, min: 1)
            try self.validate(self.reservationName, name: "reservationName", parent: name, max: 64)
            try self.validate(self.reservationName, name: "reservationName", parent: name, min: 5)
            try self.validate(self.reservedElasticsearchInstanceOfferingId, name: "reservedElasticsearchInstanceOfferingId", parent: name, pattern: "\\p{XDigit}{8}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceCount = "InstanceCount"
            case reservationName = "ReservationName"
            case reservedElasticsearchInstanceOfferingId = "ReservedElasticsearchInstanceOfferingId"
        }
    }

    public struct PurchaseReservedElasticsearchInstanceOfferingResponse: AWSDecodableShape {
        /// The customer-specified identifier used to track this reservation.
        public let reservationName: String?
        /// Details of the reserved Elasticsearch instance which was purchased.
        public let reservedElasticsearchInstanceId: String?

        public init(reservationName: String? = nil, reservedElasticsearchInstanceId: String? = nil) {
            self.reservationName = reservationName
            self.reservedElasticsearchInstanceId = reservedElasticsearchInstanceId
        }

        private enum CodingKeys: String, CodingKey {
            case reservationName = "ReservationName"
            case reservedElasticsearchInstanceId = "ReservedElasticsearchInstanceId"
        }
    }

    public struct RecurringCharge: AWSDecodableShape {
        /// The monetary amount of the recurring charge.
        public let recurringChargeAmount: Double?
        /// The frequency of the recurring charge.
        public let recurringChargeFrequency: String?

        public init(recurringChargeAmount: Double? = nil, recurringChargeFrequency: String? = nil) {
            self.recurringChargeAmount = recurringChargeAmount
            self.recurringChargeFrequency = recurringChargeFrequency
        }

        private enum CodingKeys: String, CodingKey {
            case recurringChargeAmount = "RecurringChargeAmount"
            case recurringChargeFrequency = "RecurringChargeFrequency"
        }
    }

    public struct RejectInboundCrossClusterSearchConnectionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "crossClusterSearchConnectionId", location: .uri(locationName: "ConnectionId"))
        ]

        /// The id of the inbound connection that you want to reject.
        public let crossClusterSearchConnectionId: String

        public init(crossClusterSearchConnectionId: String) {
            self.crossClusterSearchConnectionId = crossClusterSearchConnectionId
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RejectInboundCrossClusterSearchConnectionResponse: AWSDecodableShape {
        /// Specifies the InboundCrossClusterSearchConnection of rejected inbound connection.
        public let crossClusterSearchConnection: InboundCrossClusterSearchConnection?

        public init(crossClusterSearchConnection: InboundCrossClusterSearchConnection? = nil) {
            self.crossClusterSearchConnection = crossClusterSearchConnection
        }

        private enum CodingKeys: String, CodingKey {
            case crossClusterSearchConnection = "CrossClusterSearchConnection"
        }
    }

    public struct RemoveTagsRequest: AWSEncodableShape {
        /// Specifies the ARN for the Elasticsearch domain from which you want to delete the specified tags.
        public let arn: String
        /// Specifies the TagKey list which you want to remove from the Elasticsearch domain.
        public let tagKeys: [String]

        public init(arn: String, tagKeys: [String]) {
            self.arn = arn
            self.tagKeys = tagKeys
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "ARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct ReservedElasticsearchInstance: AWSDecodableShape {
        /// The currency code for the reserved Elasticsearch instance offering.
        public let currencyCode: String?
        /// The duration, in seconds, for which the Elasticsearch instance is reserved.
        public let duration: Int?
        /// The number of Elasticsearch instances that have been reserved.
        public let elasticsearchInstanceCount: Int?
        /// The Elasticsearch instance type offered by the reserved instance offering.
        public let elasticsearchInstanceType: ESPartitionInstanceType?
        /// The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering.
        public let fixedPrice: Double?
        /// The payment option as defined in the reserved Elasticsearch instance offering.
        public let paymentOption: ReservedElasticsearchInstancePaymentOption?
        /// The charge to your account regardless of whether you are creating any domains using the instance offering.
        public let recurringCharges: [RecurringCharge]?
        /// The customer-specified identifier to track this reservation.
        public let reservationName: String?
        /// The unique identifier for the reservation.
        public let reservedElasticsearchInstanceId: String?
        /// The offering identifier.
        public let reservedElasticsearchInstanceOfferingId: String?
        /// The time the reservation started.
        public let startTime: Date?
        /// The state of the reserved Elasticsearch instance.
        public let state: String?
        /// The rate you are charged for each hour for the domain that is using this reserved instance.
        public let usagePrice: Double?

        public init(currencyCode: String? = nil, duration: Int? = nil, elasticsearchInstanceCount: Int? = nil, elasticsearchInstanceType: ESPartitionInstanceType? = nil, fixedPrice: Double? = nil, paymentOption: ReservedElasticsearchInstancePaymentOption? = nil, recurringCharges: [RecurringCharge]? = nil, reservationName: String? = nil, reservedElasticsearchInstanceId: String? = nil, reservedElasticsearchInstanceOfferingId: String? = nil, startTime: Date? = nil, state: String? = nil, usagePrice: Double? = nil) {
            self.currencyCode = currencyCode
            self.duration = duration
            self.elasticsearchInstanceCount = elasticsearchInstanceCount
            self.elasticsearchInstanceType = elasticsearchInstanceType
            self.fixedPrice = fixedPrice
            self.paymentOption = paymentOption
            self.recurringCharges = recurringCharges
            self.reservationName = reservationName
            self.reservedElasticsearchInstanceId = reservedElasticsearchInstanceId
            self.reservedElasticsearchInstanceOfferingId = reservedElasticsearchInstanceOfferingId
            self.startTime = startTime
            self.state = state
            self.usagePrice = usagePrice
        }

        private enum CodingKeys: String, CodingKey {
            case currencyCode = "CurrencyCode"
            case duration = "Duration"
            case elasticsearchInstanceCount = "ElasticsearchInstanceCount"
            case elasticsearchInstanceType = "ElasticsearchInstanceType"
            case fixedPrice = "FixedPrice"
            case paymentOption = "PaymentOption"
            case recurringCharges = "RecurringCharges"
            case reservationName = "ReservationName"
            case reservedElasticsearchInstanceId = "ReservedElasticsearchInstanceId"
            case reservedElasticsearchInstanceOfferingId = "ReservedElasticsearchInstanceOfferingId"
            case startTime = "StartTime"
            case state = "State"
            case usagePrice = "UsagePrice"
        }
    }

    public struct ReservedElasticsearchInstanceOffering: AWSDecodableShape {
        /// The currency code for the reserved Elasticsearch instance offering.
        public let currencyCode: String?
        /// The duration, in seconds, for which the offering will reserve the Elasticsearch instance.
        public let duration: Int?
        /// The Elasticsearch instance type offered by the reserved instance offering.
        public let elasticsearchInstanceType: ESPartitionInstanceType?
        /// The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering.
        public let fixedPrice: Double?
        /// Payment option for the reserved Elasticsearch instance offering
        public let paymentOption: ReservedElasticsearchInstancePaymentOption?
        /// The charge to your account regardless of whether you are creating any domains using the instance offering.
        public let recurringCharges: [RecurringCharge]?
        /// The Elasticsearch reserved instance offering identifier.
        public let reservedElasticsearchInstanceOfferingId: String?
        /// The rate you are charged for each hour the domain that is using the offering is running.
        public let usagePrice: Double?

        public init(currencyCode: String? = nil, duration: Int? = nil, elasticsearchInstanceType: ESPartitionInstanceType? = nil, fixedPrice: Double? = nil, paymentOption: ReservedElasticsearchInstancePaymentOption? = nil, recurringCharges: [RecurringCharge]? = nil, reservedElasticsearchInstanceOfferingId: String? = nil, usagePrice: Double? = nil) {
            self.currencyCode = currencyCode
            self.duration = duration
            self.elasticsearchInstanceType = elasticsearchInstanceType
            self.fixedPrice = fixedPrice
            self.paymentOption = paymentOption
            self.recurringCharges = recurringCharges
            self.reservedElasticsearchInstanceOfferingId = reservedElasticsearchInstanceOfferingId
            self.usagePrice = usagePrice
        }

        private enum CodingKeys: String, CodingKey {
            case currencyCode = "CurrencyCode"
            case duration = "Duration"
            case elasticsearchInstanceType = "ElasticsearchInstanceType"
            case fixedPrice = "FixedPrice"
            case paymentOption = "PaymentOption"
            case recurringCharges = "RecurringCharges"
            case reservedElasticsearchInstanceOfferingId = "ReservedElasticsearchInstanceOfferingId"
            case usagePrice = "UsagePrice"
        }
    }

    public struct SAMLIdp: AWSEncodableShape & AWSDecodableShape {
        /// The unique Entity ID of the application in SAML Identity Provider.
        public let entityId: String
        /// The Metadata of the SAML application in xml format.
        public let metadataContent: String

        public init(entityId: String, metadataContent: String) {
            self.entityId = entityId
            self.metadataContent = metadataContent
        }

        public func validate(name: String) throws {
            try self.validate(self.entityId, name: "entityId", parent: name, max: 512)
            try self.validate(self.entityId, name: "entityId", parent: name, min: 8)
            try self.validate(self.metadataContent, name: "metadataContent", parent: name, max: 1_048_576)
            try self.validate(self.metadataContent, name: "metadataContent", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case metadataContent = "MetadataContent"
        }
    }

    public struct SAMLOptionsInput: AWSEncodableShape {
        /// True if SAML is enabled.
        public let enabled: Bool?
        /// Specifies the SAML Identity Provider's information.
        public let idp: SAMLIdp?
        /// The backend role to which the SAML master user is mapped to.
        public let masterBackendRole: String?
        /// The SAML master username, which is stored in the Amazon Elasticsearch Service domain's internal database.
        public let masterUserName: String?
        /// The key to use for matching the SAML Roles attribute.
        public let rolesKey: String?
        /// The duration, in minutes, after which a user session becomes inactive. Acceptable values are between 1 and 1440, and the default value is 60.
        public let sessionTimeoutMinutes: Int?
        /// The key to use for matching the SAML Subject attribute.
        public let subjectKey: String?

        public init(enabled: Bool? = nil, idp: SAMLIdp? = nil, masterBackendRole: String? = nil, masterUserName: String? = nil, rolesKey: String? = nil, sessionTimeoutMinutes: Int? = nil, subjectKey: String? = nil) {
            self.enabled = enabled
            self.idp = idp
            self.masterBackendRole = masterBackendRole
            self.masterUserName = masterUserName
            self.rolesKey = rolesKey
            self.sessionTimeoutMinutes = sessionTimeoutMinutes
            self.subjectKey = subjectKey
        }

        public func validate(name: String) throws {
            try self.idp?.validate(name: "\(name).idp")
            try self.validate(self.masterBackendRole, name: "masterBackendRole", parent: name, max: 256)
            try self.validate(self.masterBackendRole, name: "masterBackendRole", parent: name, min: 1)
            try self.validate(self.masterUserName, name: "masterUserName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case idp = "Idp"
            case masterBackendRole = "MasterBackendRole"
            case masterUserName = "MasterUserName"
            case rolesKey = "RolesKey"
            case sessionTimeoutMinutes = "SessionTimeoutMinutes"
            case subjectKey = "SubjectKey"
        }
    }

    public struct SAMLOptionsOutput: AWSDecodableShape {
        /// True if SAML is enabled.
        public let enabled: Bool?
        /// Describes the SAML Identity Provider's information.
        public let idp: SAMLIdp?
        /// The key used for matching the SAML Roles attribute.
        public let rolesKey: String?
        /// The duration, in minutes, after which a user session becomes inactive.
        public let sessionTimeoutMinutes: Int?
        /// The key used for matching the SAML Subject attribute.
        public let subjectKey: String?

        public init(enabled: Bool? = nil, idp: SAMLIdp? = nil, rolesKey: String? = nil, sessionTimeoutMinutes: Int? = nil, subjectKey: String? = nil) {
            self.enabled = enabled
            self.idp = idp
            self.rolesKey = rolesKey
            self.sessionTimeoutMinutes = sessionTimeoutMinutes
            self.subjectKey = subjectKey
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case idp = "Idp"
            case rolesKey = "RolesKey"
            case sessionTimeoutMinutes = "SessionTimeoutMinutes"
            case subjectKey = "SubjectKey"
        }
    }

    public struct ScheduledAutoTuneDetails: AWSDecodableShape {
        /// Specifies Auto-Tune action description.
        public let action: String?
        /// Specifies Auto-Tune action type. Valid values are JVM_HEAP_SIZE_TUNING and JVM_YOUNG_GEN_TUNING.
        public let actionType: ScheduledAutoTuneActionType?
        /// Specifies timestamp for the Auto-Tune action scheduled for the domain.
        public let date: Date?
        /// Specifies Auto-Tune action severity. Valid values are LOW, MEDIUM and HIGH.
        public let severity: ScheduledAutoTuneSeverityType?

        public init(action: String? = nil, actionType: ScheduledAutoTuneActionType? = nil, date: Date? = nil, severity: ScheduledAutoTuneSeverityType? = nil) {
            self.action = action
            self.actionType = actionType
            self.date = date
            self.severity = severity
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case actionType = "ActionType"
            case date = "Date"
            case severity = "Severity"
        }
    }

    public struct ServiceSoftwareOptions: AWSDecodableShape {
        /// Timestamp, in Epoch time, until which you can manually request a service software update. After this date, we automatically update your service software.
        public let automatedUpdateDate: Date?
        /// True if you are able to cancel your service software version update. False if you are not able to cancel your service software version.
        public let cancellable: Bool?
        /// The current service software version that is present on the domain.
        public let currentVersion: String?
        /// The description of the UpdateStatus.
        public let description: String?
        /// The new service software version if one is available.
        public let newVersion: String?
        /// True if a service software is never automatically updated. False if a service software is automatically updated after AutomatedUpdateDate.
        public let optionalDeployment: Bool?
        /// True if you are able to update you service software version. False if you are not able to update your service software version.
        public let updateAvailable: Bool?
        /// The status of your service software update. This field can take the following values: ELIGIBLE, PENDING_UPDATE, IN_PROGRESS, COMPLETED, and NOT_ELIGIBLE.
        public let updateStatus: DeploymentStatus?

        public init(automatedUpdateDate: Date? = nil, cancellable: Bool? = nil, currentVersion: String? = nil, description: String? = nil, newVersion: String? = nil, optionalDeployment: Bool? = nil, updateAvailable: Bool? = nil, updateStatus: DeploymentStatus? = nil) {
            self.automatedUpdateDate = automatedUpdateDate
            self.cancellable = cancellable
            self.currentVersion = currentVersion
            self.description = description
            self.newVersion = newVersion
            self.optionalDeployment = optionalDeployment
            self.updateAvailable = updateAvailable
            self.updateStatus = updateStatus
        }

        private enum CodingKeys: String, CodingKey {
            case automatedUpdateDate = "AutomatedUpdateDate"
            case cancellable = "Cancellable"
            case currentVersion = "CurrentVersion"
            case description = "Description"
            case newVersion = "NewVersion"
            case optionalDeployment = "OptionalDeployment"
            case updateAvailable = "UpdateAvailable"
            case updateStatus = "UpdateStatus"
        }
    }

    public struct SnapshotOptions: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the time, in UTC format, when the service takes a daily automated snapshot of the specified Elasticsearch domain. Default value is 0 hours.
        public let automatedSnapshotStartHour: Int?

        public init(automatedSnapshotStartHour: Int? = nil) {
            self.automatedSnapshotStartHour = automatedSnapshotStartHour
        }

        private enum CodingKeys: String, CodingKey {
            case automatedSnapshotStartHour = "AutomatedSnapshotStartHour"
        }
    }

    public struct SnapshotOptionsStatus: AWSDecodableShape {
        /// Specifies the daily snapshot options specified for the Elasticsearch domain.
        public let options: SnapshotOptions
        /// Specifies the status of a daily automated snapshot.
        public let status: OptionStatus

        public init(options: SnapshotOptions, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct StartElasticsearchServiceSoftwareUpdateRequest: AWSEncodableShape {
        /// The name of the domain that you want to update to the latest service software.
        public let domainName: String

        public init(domainName: String) {
            self.domainName = domainName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
        }
    }

    public struct StartElasticsearchServiceSoftwareUpdateResponse: AWSDecodableShape {
        /// The current status of the Elasticsearch service software update.
        public let serviceSoftwareOptions: ServiceSoftwareOptions?

        public init(serviceSoftwareOptions: ServiceSoftwareOptions? = nil) {
            self.serviceSoftwareOptions = serviceSoftwareOptions
        }

        private enum CodingKeys: String, CodingKey {
            case serviceSoftwareOptions = "ServiceSoftwareOptions"
        }
    }

    public struct StorageType: AWSDecodableShape {
        public let storageSubTypeName: String?
        /// List of limits that are applicable for given storage type.
        public let storageTypeLimits: [StorageTypeLimit]?
        public let storageTypeName: String?

        public init(storageSubTypeName: String? = nil, storageTypeLimits: [StorageTypeLimit]? = nil, storageTypeName: String? = nil) {
            self.storageSubTypeName = storageSubTypeName
            self.storageTypeLimits = storageTypeLimits
            self.storageTypeName = storageTypeName
        }

        private enum CodingKeys: String, CodingKey {
            case storageSubTypeName = "StorageSubTypeName"
            case storageTypeLimits = "StorageTypeLimits"
            case storageTypeName = "StorageTypeName"
        }
    }

    public struct StorageTypeLimit: AWSDecodableShape {
        ///  Name of storage limits that are applicable for given storage type. If  StorageType  is ebs, following storage options are applicable  MinimumVolumeSize Minimum amount of volume size that is applicable for given storage type.It can be empty if it is not applicable. MaximumVolumeSize Maximum amount of volume size that is applicable for given storage type.It can be empty if it is not applicable. MaximumIops Maximum amount of Iops that is applicable for given storage type.It can be empty if it is not applicable. MinimumIops Minimum amount of Iops that is applicable for given storage type.It can be empty if it is not applicable.
        public let limitName: String?
        ///  Values for the  StorageTypeLimit$LimitName  .
        public let limitValues: [String]?

        public init(limitName: String? = nil, limitValues: [String]? = nil) {
            self.limitName = limitName
            self.limitValues = limitValues
        }

        private enum CodingKeys: String, CodingKey {
            case limitName = "LimitName"
            case limitValues = "LimitValues"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the TagKey, the name of the tag. Tag keys must be unique for the Elasticsearch domain to which they are attached.
        public let key: String
        /// Specifies the TagValue, the value assigned to the corresponding tag key. Tag values can be null and do not have to be unique in a tag set. For example, you can have a key value pair in a tag set of project : Trinity and cost-center : Trinity
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct UpdateElasticsearchDomainConfigRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainName", location: .uri(locationName: "DomainName"))
        ]

        /// IAM access policy as a JSON-formatted string.
        public let accessPolicies: String?
        /// Modifies the advanced option to allow references to indices in an HTTP request body. Must be false when configuring access to individual sub-resources. By default, the value is true. See Configuration Advanced Options for more information.
        public let advancedOptions: [String: String]?
        /// Specifies advanced security options.
        public let advancedSecurityOptions: AdvancedSecurityOptionsInput?
        /// Specifies Auto-Tune options.
        public let autoTuneOptions: AutoTuneOptions?
        /// Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see Amazon Cognito Authentication for Kibana.
        public let cognitoOptions: CognitoOptions?
        /// Options to specify configuration that will be applied to the domain endpoint.
        public let domainEndpointOptions: DomainEndpointOptions?
        /// The name of the Elasticsearch domain that you are updating.
        public let domainName: String
        /// Specify the type and size of the EBS volume that you want to use.
        public let eBSOptions: EBSOptions?
        /// The type and number of instances to instantiate for the domain cluster.
        public let elasticsearchClusterConfig: ElasticsearchClusterConfig?
        /// Specifies the Encryption At Rest Options.
        public let encryptionAtRestOptions: EncryptionAtRestOptions?
        /// Map of LogType and LogPublishingOption, each containing options to publish a given type of Elasticsearch log.
        public let logPublishingOptions: [LogType: LogPublishingOption]?
        /// Specifies the NodeToNodeEncryptionOptions.
        public let nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptions?
        /// Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0 hours.
        public let snapshotOptions: SnapshotOptions?
        /// Options to specify the subnets and security groups for VPC endpoint. For more information, see Creating a VPC in VPC Endpoints for Amazon Elasticsearch Service Domains
        public let vPCOptions: VPCOptions?

        public init(accessPolicies: String? = nil, advancedOptions: [String: String]? = nil, advancedSecurityOptions: AdvancedSecurityOptionsInput? = nil, autoTuneOptions: AutoTuneOptions? = nil, cognitoOptions: CognitoOptions? = nil, domainEndpointOptions: DomainEndpointOptions? = nil, domainName: String, eBSOptions: EBSOptions? = nil, elasticsearchClusterConfig: ElasticsearchClusterConfig? = nil, encryptionAtRestOptions: EncryptionAtRestOptions? = nil, logPublishingOptions: [LogType: LogPublishingOption]? = nil, nodeToNodeEncryptionOptions: NodeToNodeEncryptionOptions? = nil, snapshotOptions: SnapshotOptions? = nil, vPCOptions: VPCOptions? = nil) {
            self.accessPolicies = accessPolicies
            self.advancedOptions = advancedOptions
            self.advancedSecurityOptions = advancedSecurityOptions
            self.autoTuneOptions = autoTuneOptions
            self.cognitoOptions = cognitoOptions
            self.domainEndpointOptions = domainEndpointOptions
            self.domainName = domainName
            self.eBSOptions = eBSOptions
            self.elasticsearchClusterConfig = elasticsearchClusterConfig
            self.encryptionAtRestOptions = encryptionAtRestOptions
            self.logPublishingOptions = logPublishingOptions
            self.nodeToNodeEncryptionOptions = nodeToNodeEncryptionOptions
            self.snapshotOptions = snapshotOptions
            self.vPCOptions = vPCOptions
        }

        public func validate(name: String) throws {
            try self.advancedSecurityOptions?.validate(name: "\(name).advancedSecurityOptions")
            try self.autoTuneOptions?.validate(name: "\(name).autoTuneOptions")
            try self.cognitoOptions?.validate(name: "\(name).cognitoOptions")
            try self.domainEndpointOptions?.validate(name: "\(name).domainEndpointOptions")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
            try self.encryptionAtRestOptions?.validate(name: "\(name).encryptionAtRestOptions")
        }

        private enum CodingKeys: String, CodingKey {
            case accessPolicies = "AccessPolicies"
            case advancedOptions = "AdvancedOptions"
            case advancedSecurityOptions = "AdvancedSecurityOptions"
            case autoTuneOptions = "AutoTuneOptions"
            case cognitoOptions = "CognitoOptions"
            case domainEndpointOptions = "DomainEndpointOptions"
            case eBSOptions = "EBSOptions"
            case elasticsearchClusterConfig = "ElasticsearchClusterConfig"
            case encryptionAtRestOptions = "EncryptionAtRestOptions"
            case logPublishingOptions = "LogPublishingOptions"
            case nodeToNodeEncryptionOptions = "NodeToNodeEncryptionOptions"
            case snapshotOptions = "SnapshotOptions"
            case vPCOptions = "VPCOptions"
        }
    }

    public struct UpdateElasticsearchDomainConfigResponse: AWSDecodableShape {
        /// The status of the updated Elasticsearch domain.
        public let domainConfig: ElasticsearchDomainConfig

        public init(domainConfig: ElasticsearchDomainConfig) {
            self.domainConfig = domainConfig
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfig = "DomainConfig"
        }
    }

    public struct UpdatePackageRequest: AWSEncodableShape {
        /// An info message for the new version which will be shown as part of GetPackageVersionHistoryResponse.
        public let commitMessage: String?
        /// New description of the package.
        public let packageDescription: String?
        /// Unique identifier for the package.
        public let packageID: String
        public let packageSource: PackageSource

        public init(commitMessage: String? = nil, packageDescription: String? = nil, packageID: String, packageSource: PackageSource) {
            self.commitMessage = commitMessage
            self.packageDescription = packageDescription
            self.packageID = packageID
            self.packageSource = packageSource
        }

        public func validate(name: String) throws {
            try self.validate(self.commitMessage, name: "commitMessage", parent: name, max: 160)
            try self.validate(self.packageDescription, name: "packageDescription", parent: name, max: 1024)
            try self.packageSource.validate(name: "\(name).packageSource")
        }

        private enum CodingKeys: String, CodingKey {
            case commitMessage = "CommitMessage"
            case packageDescription = "PackageDescription"
            case packageID = "PackageID"
            case packageSource = "PackageSource"
        }
    }

    public struct UpdatePackageResponse: AWSDecodableShape {
        /// Information about the package PackageDetails.
        public let packageDetails: PackageDetails?

        public init(packageDetails: PackageDetails? = nil) {
            self.packageDetails = packageDetails
        }

        private enum CodingKeys: String, CodingKey {
            case packageDetails = "PackageDetails"
        }
    }

    public struct UpgradeElasticsearchDomainRequest: AWSEncodableShape {
        public let domainName: String
        ///  This flag, when set to True, indicates that an Upgrade Eligibility Check needs to be performed. This will not actually perform the Upgrade.
        public let performCheckOnly: Bool?
        /// The version of Elasticsearch that you intend to upgrade the domain to.
        public let targetVersion: String

        public init(domainName: String, performCheckOnly: Bool? = nil, targetVersion: String) {
            self.domainName = domainName
            self.performCheckOnly = performCheckOnly
            self.targetVersion = targetVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.domainName, name: "domainName", parent: name, max: 28)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 3)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "[a-z][a-z0-9\\-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
            case performCheckOnly = "PerformCheckOnly"
            case targetVersion = "TargetVersion"
        }
    }

    public struct UpgradeElasticsearchDomainResponse: AWSDecodableShape {
        public let domainName: String?
        ///  This flag, when set to True, indicates that an Upgrade Eligibility Check needs to be performed. This will not actually perform the Upgrade.
        public let performCheckOnly: Bool?
        /// The version of Elasticsearch that you intend to upgrade the domain to.
        public let targetVersion: String?

        public init(domainName: String? = nil, performCheckOnly: Bool? = nil, targetVersion: String? = nil) {
            self.domainName = domainName
            self.performCheckOnly = performCheckOnly
            self.targetVersion = targetVersion
        }

        private enum CodingKeys: String, CodingKey {
            case domainName = "DomainName"
            case performCheckOnly = "PerformCheckOnly"
            case targetVersion = "TargetVersion"
        }
    }

    public struct UpgradeHistory: AWSDecodableShape {
        /// UTC Timestamp at which the Upgrade API call was made in "yyyy-MM-ddTHH:mm:ssZ" format.
        public let startTimestamp: Date?
        ///  A list of  UpgradeStepItem  s representing information about each step performed as pard of a specific Upgrade or Upgrade Eligibility Check.
        public let stepsList: [UpgradeStepItem]?
        /// A string that describes the update briefly
        public let upgradeName: String?
        ///  The overall status of the update. The status can take one of the following values:  In Progress Succeeded Succeeded with Issues Failed
        public let upgradeStatus: UpgradeStatus?

        public init(startTimestamp: Date? = nil, stepsList: [UpgradeStepItem]? = nil, upgradeName: String? = nil, upgradeStatus: UpgradeStatus? = nil) {
            self.startTimestamp = startTimestamp
            self.stepsList = stepsList
            self.upgradeName = upgradeName
            self.upgradeStatus = upgradeStatus
        }

        private enum CodingKeys: String, CodingKey {
            case startTimestamp = "StartTimestamp"
            case stepsList = "StepsList"
            case upgradeName = "UpgradeName"
            case upgradeStatus = "UpgradeStatus"
        }
    }

    public struct UpgradeStepItem: AWSDecodableShape {
        /// A list of strings containing detailed information about the errors encountered in a particular step.
        public let issues: [String]?
        /// The Floating point value representing progress percentage of a particular step.
        public let progressPercent: Double?
        ///  Represents one of 3 steps that an Upgrade or Upgrade Eligibility Check does through:  PreUpgradeCheck Snapshot Upgrade
        public let upgradeStep: UpgradeStep?
        ///  The status of a particular step during an upgrade. The status can take one of the following values:  In Progress Succeeded Succeeded with Issues Failed
        public let upgradeStepStatus: UpgradeStatus?

        public init(issues: [String]? = nil, progressPercent: Double? = nil, upgradeStep: UpgradeStep? = nil, upgradeStepStatus: UpgradeStatus? = nil) {
            self.issues = issues
            self.progressPercent = progressPercent
            self.upgradeStep = upgradeStep
            self.upgradeStepStatus = upgradeStepStatus
        }

        private enum CodingKeys: String, CodingKey {
            case issues = "Issues"
            case progressPercent = "ProgressPercent"
            case upgradeStep = "UpgradeStep"
            case upgradeStepStatus = "UpgradeStepStatus"
        }
    }

    public struct VPCDerivedInfo: AWSDecodableShape {
        /// The availability zones for the Elasticsearch domain. Exists only if the domain was created with VPCOptions.
        public let availabilityZones: [String]?
        /// Specifies the security groups for VPC endpoint.
        public let securityGroupIds: [String]?
        /// Specifies the subnets for VPC endpoint.
        public let subnetIds: [String]?
        /// The VPC Id for the Elasticsearch domain. Exists only if the domain was created with VPCOptions.
        public let vPCId: String?

        public init(availabilityZones: [String]? = nil, securityGroupIds: [String]? = nil, subnetIds: [String]? = nil, vPCId: String? = nil) {
            self.availabilityZones = availabilityZones
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
            self.vPCId = vPCId
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZones = "AvailabilityZones"
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
            case vPCId = "VPCId"
        }
    }

    public struct VPCDerivedInfoStatus: AWSDecodableShape {
        ///  Specifies the VPC options for the specified Elasticsearch domain.
        public let options: VPCDerivedInfo
        ///  Specifies the status of the VPC options for the specified Elasticsearch domain.
        public let status: OptionStatus

        public init(options: VPCDerivedInfo, status: OptionStatus) {
            self.options = options
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case status = "Status"
        }
    }

    public struct VPCOptions: AWSEncodableShape {
        /// Specifies the security groups for VPC endpoint.
        public let securityGroupIds: [String]?
        /// Specifies the subnets for VPC endpoint.
        public let subnetIds: [String]?

        public init(securityGroupIds: [String]? = nil, subnetIds: [String]? = nil) {
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
        }
    }

    public struct ZoneAwarenessConfig: AWSEncodableShape & AWSDecodableShape {
        /// An integer value to indicate the number of availability zones for a domain when zone awareness is enabled. This should be equal to number of subnets if VPC endpoints is enabled
        public let availabilityZoneCount: Int?

        public init(availabilityZoneCount: Int? = nil) {
            self.availabilityZoneCount = availabilityZoneCount
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZoneCount = "AvailabilityZoneCount"
        }
    }
}
